Class IterationRunsProgramCode

java.lang.Object
org.ek9lang.compiler.support.sharing.IterationRunsProgramCode
All Implemented Interfaces:
Predicate<ISymbol>

public final class IterationRunsProgramCode extends Object implements Predicate<ISymbol>
D66 gap (Steve, 2026-10-21): does a for ... in loop over a value of this type run code of the program's own? THE test: the loop calls iterator() and then hasNext()/next() (or those two on the value itself), so it is a call that is not pure when the type - or the iterator its iterator() declares to return - has one of those methods that is not pure and is supplied by the program: a method written in EK9, or an abstract one of a built-in trait or abstract type (Iterator, Iterable) a program implements. A concrete built-in (List, Dict, String, a range, an enumeration) never calls the program back - its iterator never runs a held element's code. A generic's bare T may be anything.
  • Constructor Details

    • IterationRunsProgramCode

      public IterationRunsProgramCode()
  • Method Details