Top "Fold" questions

In functional programming, a fold, also known variously as reduction, accumulation, or catamorphism, is a type of higher-order function that recursively applies a transformation to a data structure, "collapsing" it to a summary value

Why doesn't Option have a fold method?

I wonder why scala.Option doesn't have a method fold like this defined: fold(ifSome: A => B , ifNone: => …

scala map fold scala-option
Isotope folded (elements overlap)

I have been reading stack overflow for a solution but can't find it. (full size image at http://i.imgur.…

jquery filter jquery-isotope overlap fold
What constitutes a fold for types other than list?

Consider a single-linked list. It looks something like data List x = Node x (List x) | End It is natural to …

haskell functional-programming terminology fold
python reduce to find the union of sets

I am trying to find the union of set of sets. Specifically I want the union of the list of …

python dictionary functional-programming set fold
Code folding is not saved in my vimrc

I added the following code to my .vimrc: " save and restore folds when a file is closed and re-opened autocmd …

vim config fold
Left and Right Folding over an Infinite list

I have issues with the following passage from Learn You A Haskell (Great book imo, not dissing it): One big …

list haskell functional-programming infinite fold
FoldLeft using FoldRight in scala

While going through Functional Programming in Scala, I came across this question: Can you right foldLeft in terms of foldRight? …

scala functional-programming currying fold higher-order-functions