2009/12
2010/01
2010/02
cabal install 'parsec > 3' した後に
fold f (a,c) xs = (aa,cc) where ((aa,_), ~(cc:cs)) = mapAccumL g (a,cs++[c]) xs g (a, ~(c':cs)) x = ((a',cs), c'') where (a',c'') = f (a,c') x