Is it possible to define a function with a default value for one or more parameters?
Something like
public func myFunc(param1: Nat, param2: Bool = false): Text
So I can make calls like
myFunc(1); // same as myFunc(1, false);
myFunc(2, true);
This results in a syntax error on the function declaration: syntax error, unexpected token '=', expected one of token or <phrase> sequence
I couldn’t find anything in the docs regarding default parameter values, so I’m assuming it’s not possible yet. Or maybe there’s a more Motoko-y way to accomplish this using variants or something.