ЗП
Size: a a a
R:
R:
ЗП
z' = flip {x:_, y:_} 100 200
будет {x: 200, y:100}R:
ЗП
ЗП
UpdateM будет бифункторомЗП
R:
type Update model event = UpdateM event model
newtype UpdateM event model = Update { model :: model, affs :: Array (Aff event) }
ЗП
ЗП
R:
R:
R:
instance bifunctorUpdate :: Bifunctor Update where
bimap f g (Update context) = Update context { model = f context.model, affs = (map g) <$> context.affs }
instance functorUpdate :: Functor (Flip Update model) where
map f (Update context) = Update context { model = f context.model }
ЗП
ЗП
ЗП