Haskell: Applicative

Applicative 处于 Functor 和 Monad 之间.其定义如下: 123456class Functor f => Applicative f where pure :: a -> f a liftA2 :: (a -...

Programming / Haskell

Haskell: Monads & Applicative

The Monad type class is a way to represent different ways of executing recipes

Programming / Haskell

Haskell: Functors

higher order function: transform functions to functions Functors 的作用在于 Preserve structures. 例如 map 可以处理 [a] -> [b] 的问题,而...

Programming / Haskell