cleanup old allany.nim example
This commit is contained in:
parent
5ad1acc60c
commit
cd1b0aa87e
1 changed files with 12 additions and 14 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
# All and any
|
# All and any
|
||||||
|
|
||||||
template all(container, cond: untyped): bool =
|
template all(container, cond: untyped): bool =
|
||||||
block:
|
|
||||||
var result = true
|
var result = true
|
||||||
for it in items(container):
|
for it in items(container):
|
||||||
if not cond(it):
|
if not cond(it):
|
||||||
|
|
@ -10,7 +9,6 @@ template all(container, cond: untyped): bool =
|
||||||
result
|
result
|
||||||
|
|
||||||
template any(container, cond: untyped): bool =
|
template any(container, cond: untyped): bool =
|
||||||
block:
|
|
||||||
var result = false
|
var result = false
|
||||||
for it in items(container):
|
for it in items(container):
|
||||||
if cond(it):
|
if cond(it):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue