final case
Iterates though each element in elements.
- Authors
杨博 (Yang Bo)
- See also
Dsl.For if you want to use traditional
for
comprehension instead of !-notation.- Example
ToView.FromIterable keywords can be used to calculate cartesian product.
import com.thoughtworks.dsl.reset, reset._ def cartesianProduct = reset (List(!ToView.FromIterable(Array(1, 2, 3)) * !ToView.FromIterable(Vector(1, 10, 100, 1000)))) cartesianProduct should be(List(1, 10, 100, 1000, 2, 20, 200, 2000, 3, 30, 300, 3000))
- Companion
- object