Mapping things
This is an article explaining the concept of functor to programmers who are interested in Haskell but not sure how to get started on those abstract ideas. Many articles introduce functional programming with examples of maping, filtering and reduceing arrays, but it feels like it is not very useful except from array manipulation. This post focus on the map concept and try to explain how is it useful in other ways. (This is the 10th post for Haskell Advent Calendar 2017)
modifyC modify関数を以下のように定義する function modify<T extends object, K extends keyof T>(key: K, f: (old: T[K]) => T[K], struct: T): T オブジェクトのキーとmapする関数を受け取って、キーに入っている値をMapする関数