Closed davidchambers closed 3 years ago
sanctuary-js/sanctuary-site#92
In addition to documenting the use of lift2 and lift3 as combinators, this pull request standardizes the steps for deriving signatures of combinators from more general signatures:
lift2
lift3
Provide general signature:
Functor f => (a -> b) -> f a -> f b
Replace type variable with Function x:
Function x
(a -> b) -> Function x a -> Function x b
Convert to -> form:
->
(a -> b) -> (x -> a) -> (x -> b)
Remove unnecessary parentheses:
(a -> b) -> (x -> a) -> x -> b
Rename type variables:
(b -> c) -> (a -> b) -> a -> c
Any reason to hold off merging this @davidchambers ?
No reason whatsoever. :)
sanctuary-js/sanctuary-site#92
In addition to documenting the use of
lift2
andlift3
as combinators, this pull request standardizes the steps for deriving signatures of combinators from more general signatures:Provide general signature:
Replace type variable with
Function x
:Convert to
->
form:Remove unnecessary parentheses:
Rename type variables: