Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

probably APL, like all these things. It was probably used in some fashion before that, but my experience that is where it was named and standardised.

Heck, it is even mapped to an ASCII character IIRC: \ or /. Can't remember which, and on GPRS so Google takes a good 2 minutes.



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.


In 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: