apfl/src/functional-tests/map.at

15 lines
144 B
Text
Raw Normal View History

2022-10-30 22:07:53 +00:00
===== script =====
map := {
_ [] -> []
f [x ~xs] -> [(f x) ~(map f xs)]
}
print (map {x -> + x 1} [1 2 3])
===== output =====
[
2
3
4
]