mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 14:25:23 +00:00
Added test for #2138.
This commit is contained in:
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))
|
||||
Reference in New Issue
Block a user