From c65319376e02b6472577eaa0cfb5ee5dbe531ea4 Mon Sep 17 00:00:00 2001 From: flaviut Date: Wed, 16 Jul 2014 20:25:31 -0400 Subject: [PATCH] Mention UFCS --- content/procs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/procs.md b/content/procs.md index e51a943..6d4df43 100644 --- a/content/procs.md +++ b/content/procs.md @@ -3,14 +3,14 @@ title: Procs --- # Procs -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. +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. Another thing to note is that procedures have uniform function call syntax, which means that they can called as both `foo(a, b)` or `a.foo(b)`. ``` nimrod proc fibonacci(n: int): int = if n < 2: result = n else: - result = fibonacci(n - 1) + fibonacci(n - 2) + result = fibonacci(n - 1) + (n - 2).fibonacci ``` ## Exporting symbols