Ithaca
API
New primitives / behaviour
Subtraction operator -
The behaviour of the subtraction operator -
on values of type tez
has been changed in protocol Ithaca.
Subtracting values of type tez
yeilds on optional value. (This emits
the SUB_MUTEZ
Michelson instruction)
let d : option<tez> = (5 as mutez) - (1 as mutez); /* Some (4mutez) */
let e : option<tez> = (1 as mutez) - (5 as mutez); /* None */
Option Module
let map: (f : ((item: 'a) => 'b), value : option<'a>) => option<'b>
Applies the mapper function to the value if it is wrapped in the Some
constructor.
If the value is None
the function is not executed/applied.
Feature no longer supported
Test
let set_now = (now: timestamp) => unit
We no longer support Test.set_now
in LIGO 0.38.0
onwards, this is because
the underlying functions used by the LIGO Testing framework do not support
setting exact timestamps.