suztomoの日記

To be a good software engineer

2011-11-30から1日間の記事一覧

Gist test

Gist test

[Sports]平日プール

お休みを貰うことができたのでプールに行きました。30分泳いでいました。

Moving to haskell.g.hatena

As this blog doesn't support "super-pre notation", I go back to suztomoの日記 - haskell.

foldrとfoldl

myfoldr :: (a -> b -> b) -> b -> [a] -> b myfoldr f b alst = case alst of a : rst -> f a (foldr f b rst) _ -> b myfoldl :: (a -> b -> a) -> a -> [b] -> a myfoldl f a blst = case blst of b : rst -> myfoldl f (f a b) rst _ -> a myreverse :: …