#functional-thursday

2026-05-14
lcamel 18:30:11
開門囉 ~
lcamel 18:30:11
開門囉 ~
Slackbot 19:28:35
@nobody7548 joined #functional-thursday. They’re also new to g0v.
Slackbot 20:54:43
@yi.sun1_g0v joined #functional-thursday. They’re also new to g0v.
yi.sun1_g0v 20:59:07
@scm Graham Hutton. 1999. A tutorial on the universality and expressiveness of fold. J. Funct. Program. 9, 4 (July 1999), 355–372.
https://people.cs.nott.ac.uk/pszgmh/fold.pdf
https://dblp.org/rec/journals/jfp/Hutton99
  • 💡1
  • 👀1
Shin-Cheng Mu 2026-05-15 00:42:09
謝謝~~ will have a read! 🙂
yi.sun1_g0v 20:59:07
@scm Graham Hutton. 1999. A tutorial on the universality and expressiveness of fold. J. Funct. Program. 9, 4 (July 1999), 355–372.
https://people.cs.nott.ac.uk/pszgmh/fold.pdf
https://dblp.org/rec/journals/jfp/Hutton99
Shin-Cheng Mu 2026-05-15 00:42:09
謝謝~~ will have a read! 🙂
yi.sun1_g0v 22:36:53
2026-05-15
Shin-Cheng Mu 00:42:09
謝謝~~ will have a read! 🙂
lcamel 23:06:36
從 loop 處理一組 state (object?) 的想法來寫
https://gist.github.com/LCamel/90ad0f97fa6df6d00be779f70f90be82
如果
```fib = loop 0 1 where
loop curr next = curr : loop next (curr + next)```
把 curr 在每一圈的值想成一個 stream fibCurr
把 next 在每一圈的值想成一個 stream fibNext
可以翻譯成
```(.+.) = zipWith (+)
fibCurr = 0 : fibNext
fibNext = 1 : (fibCurr .+. fibNext)```
```fibCurr
= 0 : fibNext
-- 下式 fibNext 代入上式得到
= 0 : 1 : (fibCurr .+. fibNext)
-- 觀察上式有 fibNext = tail fibCurr, 代入得
= 0 : 1 : (fibCurr .+. tail fibCurr)```
lcamel 23:06:36
從 loop 處理一組 state (object?) 的想法來寫
https://gist.github.com/LCamel/90ad0f97fa6df6d00be779f70f90be82
如果
```fib = loop 0 1 where
loop curr next = curr : loop next (curr + next)```
把 curr 在每一圈的值想成一個 stream fibCurr
把 next 在每一圈的值想成一個 stream fibNext
可以翻譯成
```(.+.) = zipWith (+)
fibCurr = 0 : fibNext
fibNext = 1 : (fibCurr .+. fibNext)```
```fibCurr
= 0 : fibNext
-- 下式 fibNext 代入上式得到
= 0 : 1 : (fibCurr .+. fibNext)
-- 觀察上式有 fibNext = tail fibCurr, 代入得
= 0 : 1 : (fibCurr .+. tail fibCurr)```
2026-05-17
lcamel 17:05:00
如果
```fib = loop 0 1 where
loop curr next = curr : loop next (curr + next)```
把 curr 在每一圈的值想成一個 stream fibCurr
把 next 在每一圈的值想成一個 stream fibNext
可以翻譯成
```(.+.) = zipWith (+)
fibCurr = 0 : fibNext
fibNext = 1 : (fibCurr .+. fibNext)```
2026-05-18
lcamel 12:46:26
```fibCurr
= 0 : fibNext
-- 下式 fibNext 代入上式得到
= 0 : 1 : (fibCurr .+. fibNext)
-- 觀察上式有 fibNext = tail fibCurr, 代入得
= 0 : 1 : (fibCurr .+. tail fibCurr)```