-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
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) argsIt needs some type annotations in some cases, but seems like it would be handy for building these functions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels