From: Michael Orlitzky Date: Thu, 26 Dec 2013 20:23:36 +0000 (-0500) Subject: Add Uncurry.hs. X-Git-Tag: 0.0.1~163 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=90d701887a1155e7b2de86935cb438113c3c8f4f;p=dead%2Fhtsn-import.git Add Uncurry.hs. --- diff --git a/src/Uncurry.hs b/src/Uncurry.hs new file mode 100644 index 0000000..f06b3b8 --- /dev/null +++ b/src/Uncurry.hs @@ -0,0 +1,15 @@ +module Uncurry +where + + +uncurry3 :: (a -> b -> c -> d) -> ((a,b,c) -> d) +uncurry3 f = \(x,y,z) -> f x y z + +uncurry4 :: (a -> b -> c -> d -> e) -> ((a,b,c,d) -> e) +uncurry4 f = \(w,x,y,z) -> f w x y z + +uncurry5 :: (a -> b -> c -> d -> e -> f) -> ((a,b,c,d,e) -> f) +uncurry5 f = \(v,w,x,y,z) -> f v w x y z + +uncurry6 :: (a -> b -> c -> d -> e -> f -> g) -> ((a,b,c,d,e,f) -> g) +uncurry6 f = \(u,v,w,x,y,z) -> f u v w x y z