第2期 第22回 H本読書会 in 秋葉原 #readhbon

readhbon.doorkeeper.jp do記法 doを使うパターンと使わないパターンで比べてみる。 type Birds = Int type Pole = (Birds, Birds) -- 鳥 landLeft :: Birds -> Pole -> Maybe Pole landLeft n (left, right) | abs ((left + n) - right) < 4 = Just (left + n, right) | otherwise = Nothing landRight :: Birds -> Pole …