[Haskell-beginners] foldr with short circuit and accumulator
cwyang at aranetworks.com
Tue Feb 2 07:15:47 UTC 2016
Can it be possible to do fold with short circuit and accumulator both?
For example, can we find an element which is same value to adjacent one?
findAdjacent [1,2..n, n, n+1, n+2.......] => n
Though there can be many ways to do it, Can we do it with fold[r|l]?
I'll be happy to receive any comments.
More information about the Beginners