Return multiple values: Difference between revisions
Content added Content deleted
m (→{{header|Wren}}: Changed to Wren S/H) |
imported>Tromp (add BLC solution) |
||
Line 491: | Line 491: | ||
0 OK, 0:226 </pre> |
0 OK, 0:226 </pre> |
||
=={{header|Binary Lambda Calculus}}== |
|||
In the lambda calculus, one can return a tuple, which when applied to a function f, applies f to all the tuple elements. For example, <A,B,C> is <code>\f.f A B C</code>. Alternatively, one can use continuation-passing-style (cps), in which the function f is not applied the tuple return value, but instead is passed as an extra initial argument, and then the function can return f applied to the multiple values. |
|||
=={{header|BQN}}== |
=={{header|BQN}}== |