IDE for functional programming on macOS • currently in beta Interested in beta testing? Just DM an email address for a TestFlight invitatio
Applicative code —the IDE for functional programming— is now in beta and sports a Bluesky account to follow!
seen from France
seen from China
seen from Germany

seen from Malaysia
seen from United States
seen from Germany

seen from Australia
seen from T1
seen from India
seen from United States

seen from Malaysia
seen from France
seen from United States

seen from United States
seen from United States

seen from France
seen from Bahrain
seen from United Kingdom

seen from United States

seen from France
IDE for functional programming on macOS • currently in beta Interested in beta testing? Just DM an email address for a TestFlight invitatio
Applicative code —the IDE for functional programming— is now in beta and sports a Bluesky account to follow!
thinking of including an anti-passive that evolved from a directional applicative when i finally get around to making a naturalistic conlang
Trzy klasy typów Funktor, Monada i Aplikatywa są to prawdopodobnie trzy najpopularniejsze klasy typów do przetwarzania danych.
Trzy klasy typów Funktor, Monada i Aplikatywa są to prawdopodobnie trzy najpopularniejsze klasy typów do przetwarzania danych. Pora poznać je lepiej
Applicative推导
在看《Haskell趣学指南》时,其中有一个Applicative非常有意思:
let x = (+) <$> (*3) <*> (*5) in x 10
这段代码的执行结果是80,即3 * 10 + 5 * 10 = 80。为了搞清楚这个函数组合的过程,我去找了一下函数的定义:https://hackage.haskell.org/package/base-4.14.1.0/docs/src/GHC.Base.html#line-973
instance Applicative ((->) r) where pure = const (<*>) f g x = f x (g x)
根据这个定义,来逐步推导一下原始公式:
(+) <$> (*3) <*> (*5) -- => pure (+) <*> (*3) <*> (*5) -- => const (+) <*> (*3) <*> (*5)
根据<*>的定义,此时参数分别是:
f:const (+)
g:(*3)
x:待输入
因此,上述表达式可变换为:
(\x -> const (+) x ((*3) x)) <*> (*5) -- => (\x -> (+ ((*3) x))) <*> (*5) -- => (\x -> (+) ((*3) x)) <*> (*5)
同理,此时<*>的参数分别是:
f:\x -> (+) ((*3) x)
g:(*5)
x':待输入
上述表达式再次变换为:
\x' -> (\x -> (+) ((*3) x)) x' ((*5) x') -- => \x' -> (+) ((*3) x') (*5 x')
得到最终的表达式\x' -> 3 * x' + 5 * x'
New top story on Hacker News: Functor, Applicative, and Monad
New top story on Hacker News: Functor, Applicative, and Monad
Functor, Applicative, and Monad 9 by TheAsprngHacker | 0 comments on Hacker News.
View On WordPress
New top story on Hacker News: Functor, Applicative, and Monad
New top story on Hacker News: Functor, Applicative, and Monad
Functor, Applicative, and Monad 5 by TheAsprngHacker | 0 comments on Hacker News.
View On WordPress
#Applicative Morning ! (at Capgemini, Gigaplex) https://www.instagram.com/p/BsrdurnlmhG/?utm_source=ig_tumblr_share&igshid=1jlr57hpdpdos