Skip to content

Instantly share code, notes, and snippets.

@andrewharmellaw
Created December 3, 2015 11:01
Show Gist options
  • Save andrewharmellaw/f4312a486d48da23ab91 to your computer and use it in GitHub Desktop.
Save andrewharmellaw/f4312a486d48da23ab91 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, f(0, 1)) (_ + _)
foldLeft(2 :: 3 :: Nil, (0 + 1)) (_ + _)
foldLeft(3 :: Nil, ((0 + 1) + 2)) (_ + _)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment