Ithaca
API
New primitives / behaviour
Subtraction operator -
The behaviour of the subtraction operator -
on values of type mav
has been changed in protocol Ithaca.
Subtracting values of type mav
yeilds on optional value. (This emits
the SUB_MUMAV
Michelson instruction)
let d : option<mav> = (5 as mumav) - (1 as mumav); /* Some (4mumav) */
let e : option<mav> = (1 as mumav) - (5 as mumav); /* 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.