Skip to content

Instantly share code, notes, and snippets.

@tkrs
Created December 2, 2014 19:06
Show Gist options
  • Save tkrs/af4b85ffbf69bfd1b0e5 to your computer and use it in GitHub Desktop.
Save tkrs/af4b85ffbf69bfd1b0e5 to your computer and use it in GitHub Desktop.
FizzBuzz one-liner on Haskell.
f = zipWith3 (\a b c -> let x = b ++ c in if null x then show a else x) [1..] (cycle ["", "", "Fizz"]) (cycle ["", "", "", "", "Buzz"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment