"Fossies" - the Fresh Open Source Software Archive

Member "ponyc-0.33.0/packages/builtin/bool.pony" (1 Nov 2019, 378 Bytes) of package /linux/misc/ponyc-0.33.0.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Pony source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 primitive Bool is Stringable
    2   new create(from: Bool) => from
    4   fun eq(y: Bool): Bool => this == y
    5   fun ne(y: Bool): Bool => this != y
    6   fun op_and(y: Bool): Bool => this and y
    7   fun op_or(y: Bool): Bool => this or y
    8   fun op_xor(y: Bool): Bool => this xor y
    9   fun op_not(): Bool => not this
   11   fun string(): String iso^ =>
   12     (if this then "true" else "false" end).string()