summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authornarimiran <miran.tuhtan+git@gmail.com>2017-10-22 13:43:45 +0200
committernarimiran <miran.tuhtan+git@gmail.com>2017-10-22 13:43:45 +0200
commitea752f29a0fd03552d49b1473b52de91b148765e (patch)
tree1e0c52a58fd1225c98f49ed9d0b014022f43f955 /lib
parenta897693395f6a7c0457133501fe9b30d975f1903 (diff)
downloadNim-ea752f29a0fd03552d49b1473b52de91b148765e.tar.gz
more descriptive names
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/collections/sequtils.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pure/collections/sequtils.nim b/lib/pure/collections/sequtils.nim
index 3e49d0982..0cc367fa7 100644
--- a/lib/pure/collections/sequtils.nim
+++ b/lib/pure/collections/sequtils.nim
@@ -43,8 +43,8 @@ proc concat*[T](seqs: varargs[seq[T]]): seq[T] =
       result[i] = itm
       inc(i)
 
-proc count*[T](s: seq[T], x: T): int =
-  ## Count the occurrences of the item `x` in the sequence `s`.
+proc count*[T](list: seq[T], item: T): int =
+  ## Count the occurrences of the item `item` in the sequence `list`.
   ##
   ## Example:
   ##
@@ -53,8 +53,8 @@ proc count*[T](s: seq[T], x: T): int =
   ##     s = @[1, 2, 2, 3, 2, 4, 2]
   ##     c = count(s, 2)
   ##   assert c == 4
-  for itm in items(s):
-    if itm == x:
+  for x in items(list):
+    if x == item:
       inc result
 
 proc cycle*[T](s: seq[T], n: Natural): seq[T] =