diff options
author | Simon Jakobi <simon.jakobi@gmail.com> | 2014-07-19 00:09:47 +0200 |
---|---|---|
committer | Simon Jakobi <simon.jakobi@gmail.com> | 2014-07-19 00:09:47 +0200 |
commit | 78b56bf7dcd3e83b18409e3a6a77cc9693fcf379 (patch) | |
tree | 594fd8ed325033e64f47f53a643644b5a65cb041 /lib | |
parent | 81d287f75812feb6eb055aa53494e0342a148563 (diff) | |
download | Nim-78b56bf7dcd3e83b18409e3a6a77cc9693fcf379.tar.gz |
sequtils: Complete mapIt documentation example
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/collections/sequtils.nim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pure/collections/sequtils.nim b/lib/pure/collections/sequtils.nim index e760c5e02..70e46cec0 100644 --- a/lib/pure/collections/sequtils.nim +++ b/lib/pure/collections/sequtils.nim @@ -388,6 +388,7 @@ template mapIt*(seq1, typ, pred: expr): expr = ## let ## nums = @[1, 2, 3, 4] ## strings = nums.mapIt(string, $(4 * it)) + ## assert strings == @["4", "8", "12", "16"] var result {.gensym.}: seq[typ] = @[] for it {.inject.} in items(seq1): result.add(pred) |