Skip to content

Instantly share code, notes, and snippets.

@gdejohn
Last active March 15, 2018 04:41
Show Gist options
  • Save gdejohn/eaebad720f140b1544f2 to your computer and use it in GitHub Desktop.
Save gdejohn/eaebad720f140b1544f2 to your computer and use it in GitHub Desktop.
Point-free nth Fibonacci number
import Control.Arrow ((&&&))
fib = fst . (iterate (snd &&& uncurry (+)) (0, 1) !!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment