Mind boggling card trick: Difference between revisions

m
→‎{{header|Javascript}}: (minor tidying of threeStacks function)
(→‎{{header|Javascript}}: Updated output formatting, refreshed sample output)
m (→‎{{header|Javascript}}: (minor tidying of threeStacks function))
Line 382:
[x, y] = take(2, xs);
return 'R' === x ? (
go([cons(y, rs), bs, cons(x, ds)], rest)
cons(y, rs), bs, cons(x, ds)
], rest)
) : go([rs, cons(y, bs), cons(x, ds)], rest)
})() : [rs, bs, cons(xs[0], ds)]
9,655

edits