re: Understanding the Fold Operation VIEW POST

TOP OF THREAD FULL DISCUSSION
re: fold starts with an initial value, whereas reduce uses the first item Nah, mind to name a single modern language where reduce does not accept ini...

In OCaml and F#, List.reduce and List.fold behave as I describe. In F#, List.reduce throws when given an empty list. In OCaml it returns None or Some for a non-empty list.

code of conduct - report abuse