Closed cvauclair closed 3 years ago
The Mesh Language should support the definition of custom infix and prefix operators using a let binding with a special syntax.
let
Infix operators should be defined using the following syntax:
let (OP) = (a, b) => // body
Example:
let (+) = (a, b) => add(a, b) let (%&%) = (a, b) => a
Prefix operators should be defined using the following syntax:
let (!OP) = (a) => // body
Examples:
let (!$) = (a) => price_feed(a)
Description
The Mesh Language should support the definition of custom infix and prefix operators using a
let
binding with a special syntax.Infix operators should be defined using the following syntax:
Example:
Prefix operators should be defined using the following syntax:
Examples: