Added test for #2138.
This commit is contained in:
parent
b6e8a1437b
commit
40ae1ad363
1 changed files with 10 additions and 0 deletions
10
tests/closure/tfutclosure2138.nim
Normal file
10
tests/closure/tfutclosure2138.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import future, sequtils
|
||||
|
||||
proc any[T](list: varargs[T], pred: (T) -> bool): bool =
|
||||
for item in list:
|
||||
if pred(item):
|
||||
result = true
|
||||
break
|
||||
|
||||
proc contains(s: string, words: varargs[string]): bool =
|
||||
any(words, (word) => s.contains(word))
|
||||
Loading…
Add table
Add a link
Reference in a new issue