Skip to content

Instantly share code, notes, and snippets.

@diegopacheco
Created January 18, 2012 01:42
Show Gist options
  • Select an option

  • Save diegopacheco/1630269 to your computer and use it in GitHub Desktop.

Select an option

Save diegopacheco/1630269 to your computer and use it in GitHub Desktop.
Currying in Haskell
-- currying.hs
mul2 :: (Num a) => a -> a -> a
mul2 x y = x * y
--
-- ghci currying.hs
--
mul2 2 3 -- 6
let double = mul2 2
double 5 -- 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment