Production code: a Counter class

The complete source of testing_grouped.ek9, compiled by the EK9 compiler. Shown on testing.html.

#!ek9
defines module site.testing.grouped

  defines class

    Counter
      ticks as Integer: 0

      count() as pure
        <- rtn as Integer: ticks

      increment()
        ticks++

      default operator ?

Download testing_grouped.ek9