]> Git — Sourcephile - tmp/julm/arpeggigon.git/blob - RCMA/Auxiliary/Curry.hs
Moved Reactogon to RCMA.
[tmp/julm/arpeggigon.git] / RCMA / Auxiliary / Curry.hs
1 -- Contains function to currify/uncurrify functions with more than
2 -- two arguments. It might be useful to use Template Haskell there.
3
4 module Reactogon.Auxiliary.Curry where
5
6 curry3 :: ((a,b,c) -> d) -> a -> b -> c -> d
7 curry3 f a b c = f (a,b,c)
8
9 uncurry3 :: (a -> b -> c -> d) -> (a,b,c) -> d
10 uncurry3 f (a,b,c) = f a b c
11
12 curry4 :: ((a,b,c,d) -> e) -> a -> b -> c -> d -> e
13 curry4 f a b c d = f (a,b,c,d)
14
15 uncurry4 :: (a -> b -> c -> d -> e) -> (a,b,c,d) -> e
16 uncurry4 f (a,b,c,d) = f a b c d