Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accumulate vs fold vs reduce vs compress

Are the functions accumulate, compress, fold & reduce synonyms?

like image 513
Tim McNamara Avatar asked Sep 10 '10 05:09

Tim McNamara


1 Answers

Well, it depends on the language. It is a common function with different names in different languages.
See: Wikipedia entry

But yes, it's commonly known as the names you mentioned plus inject.
The Wikipedia entry has a more comprehensive list of its aliases in several languages.

like image 186
NullUserException Avatar answered Oct 23 '22 13:10

NullUserException