We saw two different ways to create a function that multiplies its input by two, depending on whether we wanted to take the multiplicand as an input tiddler or as a parameter:
\function multiply-by-two(number) [<number>multiply[2]]
\function multiply-input-by-two [multiply[2]]
<<multiply-by-two 4>>
{{{ [[4]function[multiply-input-by-two]] }}}
Create a multiply-anything-by-two
function that works in either of these roles. That is:
\function multiply-anything-by-two(??) ??
* {{{ [[4]function[multiply-anything-by-two]] }}} should equal 8.
* {{{ [function[multiply-anything-by-two],[4]] }}} should equal 8.
Go to answer: Ex:MultiplyByTwoTwoWays/answer