is reduce same as haskell foldl?
Moderator: MSandro
is reduce same as haskell foldl?
i've proven that reduce can perform sum as shown below
but i cannot get this reduce to reverse the list
isn't reduce the equivalent of haskell's foldl?
Re: is reduce same as haskell foldl?
My understanding of reduce in languages is that it normally iterates over a list (or function) to "reduce" it like your first example
Using reduce to reverse a data set seems a bit convoluted to me
But as an exercise - here is my method :)
Using reduce to reverse a data set seems a bit convoluted to me
But as an exercise - here is my method :)