2012-07-01から1日間の記事一覧
amazon:すごいHaskellたのしく学ぼう! とりあえずfizzbuzzを書いてみる。 -- ghci Prelude> [if x `mod` 15 == 0 then "fizzbuzz" else if x `mod` 3 == 0 then "fizz" else if x `mod` 5 == 0 then "buzz" else show x | x <- [1..100]] -- output ["1","2…
amazon:すごいHaskellたのしく学ぼう! とりあえずfizzbuzzを書いてみる。 -- ghci Prelude> [if x `mod` 15 == 0 then "fizzbuzz" else if x `mod` 3 == 0 then "fizz" else if x `mod` 5 == 0 then "buzz" else show x | x <- [1..100]] -- output ["1","2…