mirror of
https://github.com/unisonweb/unison.git
synced 2024-10-04 13:47:26 +03:00
21 lines
456 B
Plaintext
21 lines
456 B
Plaintext
-- This brings `None` into scope unqualified
|
|
use Optional None
|
|
|
|
-- '.' is optional, this brings `None` and `Some` into
|
|
-- scope unqualified
|
|
use Optional None Some
|
|
|
|
-- Can import operators this way also
|
|
-- no need to put them in parens
|
|
use Nat +
|
|
|
|
-- Later imports shadow earlier ones
|
|
use Nat - * /
|
|
use Nat drop *
|
|
use Nat drop
|
|
-- use Int + -- this would cause type error below!
|
|
|
|
> match Some (100 + 200 / 3 * 2) with
|
|
Optional.None -> 19
|
|
Some _ -> 20
|