From fb97a53b493099f231ced2c6d5280a9ea9daff34 Mon Sep 17 00:00:00 2001 From: flaviut Date: Wed, 4 Jun 2014 19:57:55 -0400 Subject: [PATCH] revert to nested lists --- content/procs.md | 10 +++++----- content/toc.md | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/content/procs.md b/content/procs.md index 0604ccd..775bb8b 100644 --- a/content/procs.md +++ b/content/procs.md @@ -6,9 +6,9 @@ title: 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 +proc fibonacci(n: int): int = + if n < 2: + result = n + else: + result = fibonacci(n - 1) + fibonacci(n - 2) ``` \ No newline at end of file diff --git a/content/toc.md b/content/toc.md index eb29646..77ac503 100644 --- a/content/toc.md +++ b/content/toc.md @@ -3,8 +3,8 @@ * [Getting Started](/getting_started/) * [Hello World](/hello_world/) * [Variables](/variables/page/) -* [Result](/variables/result/) -* [Type Casting and Inference](/variables/type_casting_inference/) + * [Result](/variables/result/) + * [Type Casting and Inference](/variables/type_casting_inference/) * [Objects](/objects/) * [Enums](/enums/) * [If, Else, While, Block](/if_else_while/) @@ -14,4 +14,4 @@ * [Procedures](/procs/) * [Exceptions](/exceptions/) * [Varargs](/varargs/) -* [OOP Macro](/oop_macro/) +* [OOP Macro](/oop_macro/) \ No newline at end of file