Jump to content

Optional parameters: Difference between revisions

Explained Slate's implementation
(Slate implementation)
(Explained Slate's implementation)
Line 354:
 
=={{header|Slate}}==
In Slate, named optional parameters may be specified in the method signature, but not defaults, so there is a macro <tt>defaultsTo:</tt> for specifying that within the method body at run-time.
<lang slate>
s@(Sequence traits) tableSort &column: column &sortBy: sortBlock &reverse: reverse
Cookies help us deliver our services. By using our services, you agree to our use of cookies.