|
|
|
|
|
by eyegor
2352 days ago
|
|
Definitive answer: sum/union types [0] and currying/partial function application [1]. Between the two, almost anything you write becomes very easy to adapt to new requirements. Anyone who has done a medium to large scale fp project can attest to this. If you want to be pedantic, currying and partial application are separate concepts, but I've never seen an fp lang implement one without the other. Note that I linked to this f# blog because I think its example-forward approach is clearer than most fp documentation I've read. [0] https://fsharpforfunandprofit.com/posts/discriminated-unions... [1] https://fsharpforfunandprofit.com/posts/currying/ |
|