(elementType, transform)
| 3198 | } |
| 3199 | |
| 3200 | function elementsOfType(elementType, transform) { |
| 3201 | return elements(function(element) { |
| 3202 | if (element.type === elementType) { |
| 3203 | return transform(element); |
| 3204 | } else { |
| 3205 | return element; |
| 3206 | } |
| 3207 | }); |
| 3208 | } |
| 3209 | |
| 3210 | function elements(transform) { |
| 3211 | return function transformElement(element) { |