First-class functions: Difference between revisions

m
Line 1,019:
===Use functions as arguments to other functions===
 
<lang Dyalect>func Iterator.filterFilter(pred) {
for x in this when pred(x) {
yield x
Line 1,025:
}
 
[1,2,3,4,5].iterIterate().filterFilter(x => x % 2 == 0)</lang>
 
===Use functions as return values of other functions===
Anonymous user