How do I give optional arguments (i.e. inputs) to a function? For example, in
I want the
Bool flag to be optional, and to have a default value.
In a literal sense, you cannot have an optional argument.
The way to do this is to make a function take a
Maybe Bool instead of a
Bool. For example:
Instead of optionally having an argument, have a non-optional argument which has an optional type.
Created: January 10, 2023