ЗП
phantom :: forall f a . Functor f => Contravariant f => f a -> f b
phantom x = unit <$ x $< unit
Size: a a a
ЗП
phantom :: forall f a . Functor f => Contravariant f => f a -> f b
phantom x = unit <$ x $< unit
ЗП
(>$) :: forall f a b. b -> f b -> f a
(>$) = cmap <<< const
VY
newtype E6 a = E6 ((Unit → a → a) → Unit)
foo ∷ ∀ a b. (b → a) → (a → b) → E6 a → E6 b
foo h f (E6 g) = E6 \cb → g (\x y → h $ cb x (f y))
VY
VY
flip imapЗП
ЗП
VY
А⚙
>$<?VY
cmap (contramap в хаскель)VY
StoreTVY
newtype StoreT s w a = StoreT (Tuple (w (s -> a)) s)
VY
s и позволяет перейти из этого s в a (в некоем "контексте" w)ЗП
VY
extract достает из нее sЗП
VY
extend такой:extend f (StoreT (Tuple w s)) = StoreT $ Tuple ((\w' s' -> f $ StoreT $ Tuple w' s') <<= w) s
VY
VY
Store, смысл его