1 -- Contains function to currify/uncurrify functions with more than
2 -- two arguments. It might be useful to use Template Haskell there.
4 module Reactogon.Auxiliary.Curry where
6 curry3 :: ((a,b,c) -> d) -> a -> b -> c -> d
7 curry3 f a b c = f (a,b,c)
9 uncurry3 :: (a -> b -> c -> d) -> (a,b,c) -> d
10 uncurry3 f (a,b,c) = f a b c
12 curry4 :: ((a,b,c,d) -> e) -> a -> b -> c -> d -> e
13 curry4 f a b c d = f (a,b,c,d)
15 uncurry4 :: (a -> b -> c -> d -> e) -> (a,b,c,d) -> e
16 uncurry4 f (a,b,c,d) = f a b c d