further development of httpserver

This commit is contained in:
Andreas Rumpf
2010-01-05 00:34:15 +01:00
parent a58a2f3823
commit a830367996
47 changed files with 102 additions and 29 deletions

17
examples/allany.nim Executable file
View File

@@ -0,0 +1,17 @@
# All and any
template all(container, cond: expr): expr =
block:
var result = true
for item in items(container):
if not cond(item):
result = false
break
result
if all("mystring", {'a'..'z'}.contains):
echo "works"
else:
echo "does not work"