As such, it provides an example of why the stronger form of law #3 is necessary
As such, it provides an example of why the stronger form of law #3 is necessary
a closure is not just a function, it's (≈) a pair of a function plus some inputs to that fn
it's like someone took a bit of data and made it so the ONLY thing u can do with the data is call a pre-decided function
a closure is not just a function, it's (≈) a pair of a function plus some inputs to that fn
it's like someone took a bit of data and made it so the ONLY thing u can do with the data is call a pre-decided function
node 0.43s, hask 0.106s
node 0.43s, hask 0.106s
took quite a time to get to that type signature, and it's so simple, and it just works.
took quite a time to get to that type signature, and it's so simple, and it just works.
comap :: (f a -> f b) -> (a -> b)
instance Cofunctor NonEmptyList where
comap f a = head (f (singleton a))
comap :: (f a -> f b) -> (a -> b)
instance Cofunctor NonEmptyList where
comap f a = head (f (singleton a))
p :: Prism' X Y
l :: Lens' Y Z
and `p . l` is failing to typecheck as a `Prism' X Z` ??
p :: Prism' X Y
l :: Lens' Y Z
and `p . l` is failing to typecheck as a `Prism' X Z` ??