Sleeping Beauty problem: Difference between revisions
Content added Content deleted
mNo edit summary |
m (→Excel LAMBDA: Inlined a generic lambda to reduce dependency.) |
||
Line 85: | Line 85: | ||
RANDARRAY(n, 1, 0, 1, TRUE) |
RANDARRAY(n, 1, 0, 1, TRUE) |
||
), |
), |
||
CHOOSE( |
|||
{1,2}, |
|||
SUM(INDEX(headsWakes, 0, 1)), |
|||
SUM(INDEX(headsWakes, 0, 2)) |
SUM(INDEX(headsWakes, 0, 2)) |
||
) |
) |
||
) |
) |
||
)</lang> |
)</lang> |
||
and also assuming that the name TUPLE is bound to the following generic lambda in the workbook's Name Manager: |
|||
<lang lisp>TUPLE |
|||
=LAMBDA(a, |
|||
LAMBDA(b, |
|||
CHOOSE({1,2}, a, b) |
|||
) |
|||
)</lang> |
|||
{{Out}} |
{{Out}} |
||