Each

final case
class Each[Element](elements: Iterable[Element]) extends Trait

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.reset, reset._
        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
trait Trait
class Object
trait Matchable
class Any

Value members

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product