サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
パリ五輪
tel.github.io
Or: a love song to rank-2 types and phantom variables. See also part 1 and part 2. All of the code in this post is available in the blog repository on Github. In part 1 we demonstrated that we can write algorithms which require mutable references by embedding them in an abstract monad, which I called Mem, that is adequate to describe a sequential process of creating, reading, and writing from muta
See also part 1. All of the code in this post is available in the blog repository on Github. Last time we saw a way to implement Union/Find, an algorithm which depends critically on observable mutable memory, within a particular abstract monad called Mem. Monads implementing Mem model mutable memory (say that 10 times fast) and we saw that’s sufficient to recover Union/Find. But we didn’t actually
One of the big challenges you might face when learning a language like Haskell which favors immutability or purity is that suddenly all of the algorithms you once kept at your side have… well, by-and-large they’ve vanished. Many “imperative” algorithms rely upon mutable memory to work and it can be a challenge to remove that dependency. Usually in the process you’ll learn quite a bit about purely
このページを最初にブックマークしてみませんか?
『tel.github.io』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く