revert to nested lists

This commit is contained in:
flaviut 2014-06-04 19:57:55 -04:00
commit fb97a53b49
2 changed files with 8 additions and 8 deletions

View file

@ -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. 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 ``` nimrod
proc fibonacci(a, b, n: int): int = proc fibonacci(n: int): int =
if n > 1: if n < 2:
result = fibonacci(b, a+b, n - 1) result = n
else else:
a result = fibonacci(n - 1) + fibonacci(n - 2)
``` ```

View file

@ -3,8 +3,8 @@
* [Getting Started](/getting_started/) * [Getting Started](/getting_started/)
* [Hello World](/hello_world/) * [Hello World](/hello_world/)
* [Variables](/variables/page/) * [Variables](/variables/page/)
* [Result](/variables/result/) * [Result](/variables/result/)
* [Type Casting and Inference](/variables/type_casting_inference/) * [Type Casting and Inference](/variables/type_casting_inference/)
* [Objects](/objects/) * [Objects](/objects/)
* [Enums](/enums/) * [Enums](/enums/)
* [If, Else, While, Block](/if_else_while/) * [If, Else, While, Block](/if_else_while/)