遅延評価
lazy evaluation
/mrsekut-book-4873116899/030 (2章 基本の並列性: Evalモナド)
#WIP
償却データ構造は書けるが、最悪時データ構造は書けない
https://sampou.org/haskell/article/whyfp.html
関連
最左最外簡約
ちゃんと見てないが、遅延評価==最左最外簡約にはならないはず
最左最外簡約は遅延評価かもしれないが、逆は成り立たないはず
関連はしているとは思うけど
/mrsekut-book-4774183903/243
code:ghci(hs)
let x = 1 + 2 :: Int
こう書いた時点では、まだxは評価されていない
Thunk
式の定義時にThunkが作らえる
ghciの:sprintで確認できる
code:hs
let x = 1 + 2 :: Int
:sprint x
x = _
x -- 一度使用する
3
:sprint x -- 一度でも使用すると評価済みになる
x = 3
#??
メモカされるのか
関連
NFData型クラス
NFData型クラス
正格評価と遅延評価
https://www.tweag.io/blog/2022-05-12-strict-vs-lazy/
https://qiita.com/ruicc
数記事書いている
もしかしたらちょっと違う文脈かも
/mrsekut-book-4774183903/246
https://xtech.nikkei.com/it/article/COLUMN/20070305/263828/
https://qiita.com/mandel59/items/8f9111143aea94e7b363
https://kazu-yamamoto.hatenablog.jp/entry/2019/02/15/115630
https://kazu-yamamoto.hatenablog.jp/entry/20090603/1244010880
https://qiita.com/HirotoShioi/items/2adca7fa238c5abad6ef
https://mizunashi-mana.github.io/blog/posts/2020/03/haskell-lazy-debug-problem/
https://qiita.com/ruicc/items/b8b3c61a12baa1af3c69
https://haskell.e-bigmoon.com/posts/2018/06-25-all-about-strictness
https://xtech.nikkei.com/it/article/COLUMN/20070305/263828/
https://en.wikibooks.org/w/index.php?title=Haskell/Graph_reduction
graph reduction
https://haskell.jp/blog/posts/2020/strict-gotchas.html
https://en.wikipedia.org/wiki/Lambda_calculus_definition#Weak_head_normal_form
https://en.wikipedia.org/wiki/Thunk
https://twitter.com/lotz84_/status/1708006723590783247