2 ms·
Graham Hutton has a very nice tutorial [0] on the universality of fold, which shows this elegantly (in Haskell, though). [0] Graham Hutton, "A tutorial on the
by tincholio 12y ago
Graham Hutton has a very nice tutorial [0] on the universality of fold, which shows this elegantly (in Haskell, though).
[0] Graham Hutton, "A tutorial on the universality and expressiveness of fold", J. Functional Programming 9(4): 355–372, July 1999. http://www.cs.nott.ac.uk/~gmh/fold.pdf http://www.cs.nott.ac.uk/~gmh/fold.pdf