Idris2/tests/idris2/evaluator/spec001/Mult3.idr
2023-09-07 14:57:22 +01:00

12 lines
180 B
Idris

%inline %spec m
smult : (m, n : Nat) -> Nat
smult 0 n = 0
smult 1 n = n
smult (S m) n = n + smult m n
main : IO ()
main = do
n <- getLine
let p = cast n
printLn (smult 3 p)