I come across some examples in the Daml documentation where the operator '$' is being used, but cannot fully understand its purpose.
Example:
submit alice $ create User with username = alice, following = []
Is it the same as do
, like in:
submit alice do
create User with username = alice, following = []
?
The
$
operator is a substitute for parenthesis. The exampleis the same as
To complete, the
do
is used to declare a code block (more than one line of code):However, it can also be used in a single line of code: