我正在阅读 Learn You a Haskell for Great Good ,但我从来不知道如何发音 Haskell 运算符。他们有“真实”的名字吗??
例如,你如何大声朗读这样的表达方式?
Just (+3) <*> Just 9
我知道那>>=是“绑定”,但其他人呢?由于 Google 不考虑非字母数字字符,因此很难进行有效的搜索......
>>=
我意识到您可以创建自己的运算符,所以当然不是所有运算符都可以有名称,但我希望常见的运算符(例如在Applicativeor中定义的那些Monad)必须有名称......
Applicative
Monad
这是我如何发音的:
>>= bind >> then *> then -> to a -> b: a to b <- bind (as it desugars to >>=) <$> (f)map <$ map-replace by 0 <$ f: "f map-replace by 0" <*> ap(ply) (as it is the same as Control.Monad.ap) $ (none, just as " " [whitespace]) . pipe to a . b: "b pipe-to a" !! index ! index / strict a ! b: "a index b", foo !x: foo strict x <|> or / alternative expr <|> term: "expr or term" ++ concat / plus / append [] empty list : cons :: of type / as f x :: Int: f x of type Int \ lambda @ as go ll@(l:ls): go ll as l cons ls ~ lazy go ~(a,b): go lazy pair a, b