This library looks useful, thanks!
Would you be interested in adding something like
class Multivariate a where
toMulti :: forall r. (a -> r) -> Fn a r
fromMulti :: forall r. Fn a r -> a -> r
instance multiUnit :: Multivariate Unit where
toMulti = fnConst
fromMulti fn _ = getConst fn
instance multiCurry :: (Multivariate args) => Multivariate (Tuple a args) where
toMulti f = fnUncurry \a -> toMulti \args -> f (Tuple a args)
fromMulti fn (Tuple a args) = fromMulti (fnCurry fn a) args
It needs some type annotations in some cases, but seems like it would be handy for building these functions.
This library looks useful, thanks!
Would you be interested in adding something like
It needs some type annotations in some cases, but seems like it would be handy for building these functions.