Skip to content

Instantly share code, notes, and snippets.

@Koisell
Last active September 23, 2019 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Koisell/eb7ccab3f72839927b1599d9ba1422b8 to your computer and use it in GitHub Desktop.
Save Koisell/eb7ccab3f72839927b1599d9ba1422b8 to your computer and use it in GitHub Desktop.
Medium recursion schemes
List(1, 2, 3).foldl(0)(_ + _)
// foldl removes the explicit recursion.
// FOLD, REDUCE, ... already are recursion scheme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment