Skip to content

Instantly share code, notes, and snippets.

@taksuyu
Last active August 29, 2015 14:14
Show Gist options
  • Save taksuyu/e5a6bb2da33e2961e005 to your computer and use it in GitHub Desktop.
Save taksuyu/e5a6bb2da33e2961e005 to your computer and use it in GitHub Desktop.
function :: x -> x
function x = x
intFunction :: Integer -> Integer
intFunction x = x
numFunction :: Num x => x -> x
numFunction x = x
addNumFunction :: Num x => x -> x -> x
addNumFunction x y = numFunction x + numFunction y
addIntFunction :: Integer -> Integer -> Integer
addIntFunction x y = intFunction x + intFunction y
addFunction :: Num x => x -> x -> x
addFunction x y = function x + function y
add :: Num x => x -> x -> x
add x y = x + y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment