summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-07-02 00:22:23 +0200
committerAraq <rumpf_a@web.de>2014-07-02 00:22:23 +0200
commit887a1ebe688a01259263ad6e11c9061cfc940456 (patch)
tree7bf5084e8854bfb9252503418ac24b1d2394b124 /doc
parentd02cc41596602ac8039517add1c453a45a7c3558 (diff)
downloadNim-887a1ebe688a01259263ad6e11c9061cfc940456.tar.gz
tut1.txt no BOM; streamlined example a bit
Diffstat (limited to 'doc')
-rw-r--r--doc/tut1.txt12
1 files changed, 4 insertions, 8 deletions
diff --git a/doc/tut1.txt b/doc/tut1.txt
index 9874f267b..a2aa835ee 100644
--- a/doc/tut1.txt
+++ b/doc/tut1.txt
@@ -1,4 +1,4 @@
-========================
+========================
 Nimrod Tutorial (Part I)
 ========================
 
@@ -1521,17 +1521,13 @@ techniques.
 Example:
 
 .. code-block:: nimrod
+  proc echoItem(x: int) = echo(x)
 
-  type
-    TCallback = proc (x: int)
-
-  proc echoItem(x: Int) = echo(x)
-
-  proc forEach(callback: TCallback) =
+  proc forEach(action: proc (x: int)) =
     const
       data = [2, 3, 5, 7, 11]
     for d in items(data):
-      callback(d)
+      action(d)
 
   forEach(echoItem)