
14 Sep
2011
14 Sep
'11
11:09 p.m.
On 14/09/2011, at 2:45 PM, Casey McCann wrote:
class Tuple t where type Arg t :: * type Result t :: * tuple :: t -> Arg t -> Result t
instance (x1 ~ x2) => Tuple (x1 -> a, x2 -> b) where type Arg (x1 -> a, x2 -> b) = x1 type Result (x1 -> a, x2 -> b) = (a, b) tuple (f, g) x = (f x, g x)
That's it, that's what I was after. Thanks.