Haskell続き

眠さを通り越してハイになってきた。

id:ujihisa progress_turnが[Int]を返すのは妥当なのかなあ。(Int, Int, Int)のがいいきが。

data Score = Score Int Int Int deriving Show
add :: Score -> Score -> Score
add (Score x y z) (Score a b c) = (Score (x + a) (y + b) (z + c))
main = print $ (Score 1 2 3) `add` (Score 0 3 0)

こんなのにした。