]> ocean-lang.org Git - ocean/commitdiff
oceani: introduce 'test' and 'choose' operators
authorNeilBrown <neil@brown.name>
Sun, 5 Dec 2021 21:04:31 +0000 (08:04 +1100)
committerNeilBrown <neil@brown.name>
Wed, 8 Dec 2021 04:55:44 +0000 (15:55 +1100)
If a type supports testing (only Boolean currently),
   ? expr
converts to Boolean, and
   expra ?? exprb

will return expra if it tests as true, and exprb otherwise.
exprb isn't computed if not needed.

Signed-off-by: NeilBrown <neil@brown.name>

No differences found