summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorGrzegorz Adam Hankiewicz <gradha@imap.cc>2013-01-06 13:31:46 +0100
committerGrzegorz Adam Hankiewicz <gradha@imap.cc>2013-01-09 20:32:58 +0100
commit0b078e81d01f7ee3ab5d886a84d70c242228ef9b (patch)
tree35b0e1c020a680f5689abaf92e8b35a206401b3f /lib
parent6e65f5b49e7483bb7c74f70985022927aee61bdf (diff)
downloadNim-0b078e81d01f7ee3ab5d886a84d70c242228ef9b.tar.gz
Adds each's map alias to index.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/system.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 3d17b1d6d..26e5ac228 100755
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -1461,14 +1461,14 @@ proc pop*[T](s: var seq[T]): T {.inline, noSideEffect.} =
   setLen(s, L)
 
 proc each*[T, S](data: openArray[T], op: proc (x: T): S {.closure.}): seq[S] = 
-  ## The well-known ``map`` operation from functional programming. Applies
+  ## The well-known `map`:idx: operation from functional programming. Applies
   ## `op` to every item in `data` and returns the result as a sequence.
   newSeq(result, data.len)
   for i in 0..data.len-1: result[i] = op(data[i])
 
 proc each*[T](data: var openArray[T], op: proc (x: var T) {.closure.}) =
-  ## The well-known ``map`` operation from functional programming. Applies
-  ## `op` to every item in `data`.
+  ## The well-known `map`:idx: operation from functional programming. Applies
+  ## `op` to every item in `data` modifying it directly.
   for i in 0..data.len-1: op(data[i])
 
 iterator fields*[T: tuple](x: T): TObject {.