Course of Raku / Functional, concurrent, reactive, and web programming / Functional programming / Reduction / The reduce metaoperator
Quiz — The reduce metaoperator
What does the following program print?
say [min] 8, 3, 5, 1;| 0 | 17 |
| 1 | 1 |
| 0 | 8 |
| 0 | 3 |
[min] reduces the list with the min
operator, comparing the elements pairwise and keeping the smallest. The
smallest of 8, 3, 5, 1 is 1.