2016-04-29から1日間の記事一覧

F# で Either もできたよー

ʕ•͡ω•ʔ 最近 fsharp-mode より tuareg-mode のがいいんじゃないかって思うようになってきた module Data.Either type either<'a, 'b> = | Left of 'a | Right of 'b let either f g e = match e with | Left a -> f a | Right b -> g b let isLeft x = match…