Skip to content

Commit 91dec86

Browse files
authored
Add examples for listEvery
1 parent 40fce19 commit 91dec86

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

data/en/listevery.json

+16-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,22 @@
1818
"engines": {
1919
"lucee": {"minimum_version": "", "notes": "", "docs": "https://docs.lucee.org/reference/functions/listevery.html"}
2020
},
21-
"examples": [],
21+
"examples": [
22+
{
23+
"title": "Example for positive result",
24+
"description": "Checks whether all items in a list are greater than 2 and outputs true because all of them fulfill the requirement.",
25+
"code": "list = '4,5,6,7';\r\nwriteOutput(listEvery(list, function(value) { return value gt 2; }));",
26+
"result": true,
27+
"runnable": true
28+
},
29+
{
30+
"title":"Example for negative result",
31+
"description":"Checks whether all items in a list are greater than 2 and outputs false because some of them do not fulfill the requirement.",
32+
"code":"list = '1,2,3,4';\r\nwriteOutput(listEvery(list, function(value) { return value gt 2; }));",
33+
"result":false,
34+
"runnable":true
35+
}
36+
],
2237
"links": [{
2338
"title":"Map, Reduce and other Higher Order Functions",
2439
"description":"A Primer for map, reduce, filter, and Higher Order Functions in general.",

0 commit comments

Comments
 (0)