Sleeping Beauty problem: Difference between revisions

m
→‎Excel LAMBDA: Inlined a generic lambda to reduce dependency.
mNo edit summary
m (→‎Excel LAMBDA: Inlined a generic lambda to reduce dependency.)
Line 85:
RANDARRAY(n, 1, 0, 1, TRUE)
),
TUPLECHOOSE(
SUM(INDEX(headsWakes{1, 02}, 1))
) SUM(INDEX(headsWakes, 0, 1)),
SUM(INDEX(headsWakes, 0, 2))
)
)
)</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}}
 
9,655

edits