import Data.String data FizzBuzz = F | B | FB | I Integer Show FizzBuzz where show F = "fizz" show B = "buzz" show FB = "fizzbuzz" show (I n) = show n fizzBuzz : Integer -> FizzBuzz fizzBuzz n = case (n `mod` 3, n `mod` 5) of (0, 0) => FB (_, 0) => B (0, _) => F _ => I n fizzBuzzSeq : Integer -> List FizzBuzz fizzBuzzSeq n = map fizzBuzz [1..n] main : IO () main = do [_, arg] <- getArgs | _ => put
![依存型のあるHaskellことIdrisってどんな言語? | κeenのHappy Hacκing Blog](https://cdn-ak-scissors.b.st-hatena.com/image/square/0ec67704399e497e88a3b19b332bd335f8fdff1b/height=288;version=1;width=512/https%3A%2F%2Fkeens.github.io%2Fimages%2Fogp%2Fpost%2FIdristtedonnagengo_.png)