おもむろに。
scala> var increase = (x: Int) => x + 1
increase: (Int) => Int = <function>
scala> val l = List(1,2,3,4,5)
l: List[Int] = List(1, 2, 3, 4, 5)
scala> l map increase
res3: List[Int] = List(2, 3, 4, 5, 6)
scala> l.map(increase)
res5: List[Int] = List(2, 3, 4, 5, 6)
map 関数 listじゃなくてlist map 関数なのね
gauche
gosh> (map (lambda (x) (+ x 1)) '(1 2 3 4 5))
(2 3 4 5 6)
clojure
user=> (map (fn [x] (+ x 1)) [1 2 3 4 5])
(2 3 4 5 6)