From cba87d546968eb6b45393c7d236c49bc61288830 Mon Sep 17 00:00:00 2001 From: Flaviu Tamas Date: Fri, 18 Jul 2014 12:11:15 -0400 Subject: [PATCH] Fix #11 --- content/procs.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/content/procs.md b/content/procs.md index 6d4df43..c2300ef 100644 --- a/content/procs.md +++ b/content/procs.md @@ -48,19 +48,20 @@ To create an operator, the symbols that are to be used must be encased inside `` ``` nimrod proc `$`(a: array[2, array[2, int]]): string = result = "" - for y in a: + for v in a: for vx in v: result.add($vx & ", ") result.add("\n") -echo [[1, 2], # See Varargs for how - [3, 4]] # echo works +echo([[1, 2], [3, 4]]) # See varargs for + # how echo works proc `^&*^@%`(a, b: string): string = - ## An confusingly named useless proc - result = a[0] & b[high(str)] + ## An confusingly named useless operator + result = a[0] & b[high(b)] assert("foo" ^&*^@% "bar" == "fr") + ``` ## Generic Functions @@ -80,4 +81,4 @@ proc `*`[T, I](a: T, b: int): T = result = result + a assert("a" * 10 == "aaaaaaaaaaa") -``` \ No newline at end of file +```