4 ms·
APL introduced the name "reduce" and was the first to have it by ten years or so (published 1962, implemented 1966). Fairly sure Lisp had map first as the Each
by mlochbaum 6y ago
APL introduced the name "reduce" and was the first to have it by ten years or so (published 1962, implemented 1966). Fairly sure Lisp had map first as the Each operator only appeared in nested APLs around 1981. APL may have had Compress before Lisp had filter, but they're not really the same: APL's isn't a higher order function; it takes one boolean filter list and another list to be filtered.
Reduce and Compress are both denoted / which is sometimes a problem.
- bjoli 6y agoIn a language like APL map adds very little compared to reduce/fold. In scheme, fold is a lot more verbose than map. Map saves on typing and on householding. In APL? I would argue gain is a lot smaller. I have seen actually useful APL programs in less code than a fold-left filter in scheme.