We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9bbc11 commit a2eb686Copy full SHA for a2eb686
doc/docs.md
@@ -713,6 +713,15 @@ println(upper_fn) // ['HELLO', 'WORLD']
713
714
`it` is a builtin variable which refers to element currently being processed in filter/map methods.
715
716
+Additionally, `.any()` and `.all()` can be used to conveniently test
717
+for elements that satisfy a condition.
718
+
719
+```v
720
+nums := [1, 2, 3]
721
+println(nums.any(it == 2)) // true
722
+println(nums.all(it >= 2)) // false
723
+```
724
725
#### Multidimensional Arrays
726
727
Arrays can have more than one dimension.
0 commit comments