pure fp黎講真係no loop,就算可以loop,無recursive data flow都好難叫fp。如果你話齋call call higher order functions例如reduce map filter之類嘅就唔係好算fp
CapaCitor2021-04-30 23:52:10
Call map reduce filter都唔係好算
有冇咁harsh呀
實驗羊2021-04-30 23:53:05
咁如果我成個系統都係 Function 冇 Object 嘅概念咁算唔算 FP
嘴遁師青花2021-04-30 23:59:44
我一個main function寫晒所有野
實驗羊2021-05-01 00:00:38
有冇 Loop?
嘴遁師青花2021-05-01 00:04:37
唔用loop
其實同一段code copy and paste幾次都做到loop既效果
成日覺得programmer唔好局限用loop
實驗羊2021-05-01 00:04:37
Loops are discouraged as a consequence, because loops are only useful in combination with mutable state. The function as a whole is pure, which is great, but the paradigm of functional programming does not only apply at the level of whole functions.
實驗羊2021-05-01 00:04:52
屌
實驗羊2021-05-01 00:09:08
睇嚟我距離 FP 好遠
京終始果2021-05-01 02:03:30
講起fp 最近講緊下個project 想試下玩elixir
香港係咪完全冇人用
手一黏便緊(UTC+92021-05-01 02:47:58
係既 不過
Closures are poor man's objects and vice versa.