言語ゲーム

とあるエンジニアが嘘ばかり書く日記

Twitter: @propella

2007-08-07から1日間の記事一覧

[haskell] How To Arrow2 並置

import Control.Arrow newtype SF a b = SF {runSF ::[a]->[b]} instance Arrow SF where arr f = SF (map f) SF f >>> SF g = SF (f >>> g) first (SF f) = SF (unzip >>> first f >>> uncurry zip) -- ではややこしい話の前に、Arrow の利点を強調する例。…

[haskell] How To Arrow 基本

http://d.hatena.ne.jp/propella/20070807/p1 1:基本 http://d.hatena.ne.jp/propella/20070807/p2 2:並置 http://d.hatena.ne.jp/propella/20070808/p1 3:選択 -- なんか知らんうちに Arrow 流行ってるようなので試してみる。 -- http://www.cs.chalmers.se…