Skip to content

Instantly share code, notes, and snippets.

@siddhartha-gadgil
Created March 22, 2014 09:34
Show Gist options
  • Save siddhartha-gadgil/9703786 to your computer and use it in GitHub Desktop.
Save siddhartha-gadgil/9703786 to your computer and use it in GitHub Desktop.
fold_by_from_ : {A : Set} → {B : Set} → List A → (A → B → B) → B → B
fold [] by _ from b = b
fold (x :: xs) by op from b = op x (fold xs by op from b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment