Anonymous user
Apply a callback to an array: Difference between revisions
m
→{{header|Dyalect}}
m (Fixed XBS example) |
|||
Line 965:
=={{header|Dyalect}}==
<lang Dyalect>func Array.
for x in this when pred(x) {
yield x
Line 972:
var arr = [1, 2, 3, 4, 5]
var squares = arr.
print(squares)</lang>
|