further development of httpserver

This commit is contained in:
Andreas Rumpf 2010-01-05 00:34:15 +01:00
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"