Skip to content

Instantly share code, notes, and snippets.

@andrewharmellaw
Created December 3, 2015 11:04
Show Gist options
  • Save andrewharmellaw/5210485809546914271a to your computer and use it in GitHub Desktop.
Save andrewharmellaw/5210485809546914271a to your computer and use it in GitHub Desktop.
foldLeft(List(1,2,3), 0) (_ + _)
foldLeft(1 :: 2 :: 3 :: Nil, 0) (_ + _)
foldLeft(2 :: 3 :: Nil, (0 + 1)) (_ + _)
foldLeft(3 :: Nil, ((0 + 1) + 2)) (_ + _)
foldLeft(Nil, (((0 + 1) + 2) + 3)) (_ + _)
(((0 + 1) + 2) + 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment