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