diff options
author | Juan Carlos <juancarlospaco@gmail.com> | 2021-01-05 13:45:58 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 17:45:58 +0100 |
commit | b24d6d4b6a57a14aba0b22a9ea888a4adb19928c (patch) | |
tree | 03434fdfa504923ea3dbcc0df067eb0fb1db7423 /examples/allany.nim | |
parent | 3b2f94810e4826c4eef4d517175a8b6a0a8a45a2 (diff) | |
download | Nim-b24d6d4b6a57a14aba0b22a9ea888a4adb19928c.tar.gz |
Remove old untested undocumented examples (#16595)
Diffstat (limited to 'examples/allany.nim')
-rw-r--r-- | examples/allany.nim | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/examples/allany.nim b/examples/allany.nim deleted file mode 100644 index 8a5ab81f0..000000000 --- a/examples/allany.nim +++ /dev/null @@ -1,24 +0,0 @@ -# All and any - -template all(container, cond: untyped): bool = - var result = true - for it in items(container): - if not cond(it): - result = false - break - result - -template any(container, cond: untyped): bool = - var result = false - for it in items(container): - if cond(it): - result = true - break - result - -if all("mystring", {'a'..'z'}.contains) and any("myohmy", 'y'.`==`): - echo "works" -else: - echo "does not work" - - |