影片筆記: The Functional Toolkit by Scott Wlaschin
!! 圖多 !!
!! 以下的圖片都擷取自講者的投影片 !!
https://www.slideshare.net/ScottWlaschin/the-functional-programming-toolkit-ndc-oslo-2019-150648710
前言 會覺得 functional programming 很可怕,也許我們只是不熟悉這些在 FP 的字而已
如果把
functor 換成 mappable catamorphism 換成 collapsable monad 換成 chainable monoid 換成 aggregatable 就變得平易近人一些了 (?)
而且事實上,object oriented programming 也有一些看起來很可怕的字 w
The Functional Kit 這個影片主要在說 working with effects 的這幾個部分,也就是 functor, monad 和 applicative
Part 1. Core principles of statically-typed FP Functions are things function 是把輸入轉換成輸出的東西
function 是獨立的,不屬於任何 class,因為如此,function 是 reusable 的
function 可以是輸入、輸出甚至參數