author liangqin.fan gmail @ storage class Stored { flag : boolean ; } @ contract class Flipper { private stored : Stored ; constructor ( ) { this . stored = new Stored ( ) ; } @ constructor default ( initFlag ) { this . stored . flag = initFlag ; } @ message flip ( ) { const v = this . stored . flag ; this . stored . flag = ! v ; } @ message ( mutates = false ) get ( ) { return this . stored . flag ; } }