Skip to content

Instantly share code, notes, and snippets.

@BenBals
Last active March 25, 2016 19:36
Show Gist options
  • Save BenBals/f5a8c7d937019e678e90 to your computer and use it in GitHub Desktop.
Save BenBals/f5a8c7d937019e678e90 to your computer and use it in GitHub Desktop.
Add, Subtract, Multiply, Exponentiate
-- Ever wanted to add, subtract, multiply and exponentiate using all possible combinations of 1 and 2 with 3 and 4? No. Well thats how it's done in Haskell anyway. Jup just that single line.
[(+), (-), (*), (^)] <*> [1,2] <*> [3,4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment