Skip to content

Instantly share code, notes, and snippets.

@amonshiz
Created December 31, 2014 05:20
Show Gist options
  • Save amonshiz/8a08d377af96f3203525 to your computer and use it in GitHub Desktop.
Save amonshiz/8a08d377af96f3203525 to your computer and use it in GitHub Desktop.
doMathFunction :: (Int -> Int -> Int) -> Int -> Int -> Int
doMathFunction func x1 x2 = func x1 x2
-- doMathFunction (+) 1 2 ==> 3
-- doMathFunction (*) 4 3 ==> 12
-- doMathFunction (-) 4 3 ==> 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment