We have support for defining your own functions. Functions can take in any type of argument. Below is an example of the syntax:
As you can see above myFn just returns whatever it is given.
KCL uses keyword arguments:
Functions can also declare one unlabeled arg. If you do want to declare an unlabeled arg, it must be the first arg and prefixed with @, like this:
Below shows how a custom function must be called if it has a labeled argument, and another example with an unlabeled argument:
Found a typo?