revert to nested lists
This commit is contained in:
parent
4e0d445f3a
commit
fb97a53b49
2 changed files with 8 additions and 8 deletions
|
|
@ -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)
|
||||||
```
|
```
|
||||||
|
|
@ -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/)
|
||||||
|
|
@ -14,4 +14,4 @@
|
||||||
* [Procedures](/procs/)
|
* [Procedures](/procs/)
|
||||||
* [Exceptions](/exceptions/)
|
* [Exceptions](/exceptions/)
|
||||||
* [Varargs](/varargs/)
|
* [Varargs](/varargs/)
|
||||||
* [OOP Macro](/oop_macro/)
|
* [OOP Macro](/oop_macro/)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue