diff --git a/content/procs.md b/content/procs.md index 176f481..0604ccd 100644 --- a/content/procs.md +++ b/content/procs.md @@ -1,4 +1,14 @@ --- title: Procedures --- -# Procedures \ No newline at end of file +# Procedures + +Procedures in Nimrod are declared using `proc` and require that their parameter and return types be annotated. After the types and parameters, an `=` is used to denote the start of the function body. + +``` nimrod +proc fibonacci(a, b, n: int): int = + if n > 1: + result = fibonacci(b, a+b, n - 1) + else + a +``` \ No newline at end of file