iT邦幫忙

鐵人檔案

第 12 屆 iThome 鐵人賽
回列表
Software Development

Functional Programming in Kotlin 系列

主題將會由淺入深,包含了
- Functional programming 基本語法
- Functional programming 基本原則
- 解釋、應用 Monad
- Category theory 入門
- 實戰運用

鐵人鍊成 | 共 30 篇文章 | 31 人訂閱 訂閱系列文 RSS系列文 團隊Kotlin 鐵人陣
DAY 11

Introduce Functor

在前面的很多篇中介紹了許許多多不同的“容器”,那這些“容器”對於 Category theory 又有什麼樣的意義?今天就來介紹其中一個:Functor。 Fu...

2020-09-20 ‧ 由 hungyanbin 分享
DAY 12

Algebraic Data Type

Algebra ,也就是代數,大家國小都學過,可以由簡單的加法與乘法組合而成,在 Category theory 中,也有著這樣的概念,甚至可以將這些概念應用在...

2020-09-21 ‧ 由 hungyanbin 分享
DAY 13

Algebraic Data Type II

Algebraic Data Type 的 0 與 1 在數學中,我們都知道數字 0 ,0 乘任何數字都是 0 、 0 加上任何數字的話就是該數字本身 ,或是...

2020-09-22 ‧ 由 hungyanbin 分享
DAY 14

Introduce Monoid

上一篇的解答: sealed class Either<A, B>() { class Left<A, B>(val valu...

2020-09-23 ‧ 由 hungyanbin 分享
DAY 15

Lenses

今天來介紹點大家不是很常碰到的神奇用法,看看下面這段程式: data class Path(val content: String, val id: Strin...

2020-09-24 ‧ 由 hungyanbin 分享
DAY 16

Reader Monad

相依注入 - Dependency Injection ,對於 OOP 來說是一個很重要的概念,各框架、語言也都有非常多的函式庫可以用。主流的注入的方法主要有兩...

2020-09-25 ‧ 由 hungyanbin 分享
DAY 17

Composition, Abstraction and Principles

上一篇的解答: fun <D, A> List<Reader<D, A>>.liftReader(): Reader<...

2020-09-26 ‧ 由 hungyanbin 分享
DAY 18

Function type - Another Algebraic Data Type

在之前的 Algebraic Data Type 中介紹了加法與乘法,也就是 Sum Type and Product Type,今天再來介紹另外一種 Alge...

2020-09-27 ‧ 由 hungyanbin 分享
DAY 19

Curried function

前面看過兩次,今天終於要來介紹咖哩(誤)了,坦白說,在我的日常開發中並不會使用到這個概念,所以我沒辦法說服自己說,這是一個很方便的東西,以下到內容是我查閱資料整...

2020-09-28 ‧ 由 hungyanbin 分享
DAY 20

Functional Data Structure

上次的解答: fun <P1, P2, P3, R> ((P1, P2, P3) -> R).curried(): (P1) -> (P...

2020-09-29 ‧ 由 hungyanbin 分享