mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-30 15:13:37 +03:00
12 lines
180 B
Idris
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)
|