Mind boggling card trick: Difference between revisions

Content deleted Content added
Added Quackery.
Line 1,584:
=={{header|Quackery}}==
 
<lang Quackery> [ stack ] is discards ( --> s )
<lang Quackery>
[ stack ] is discards ( --> s )
[ stack ] is red-card ( --> s )
[ stack ] is black-card ( --> s )
 
[ dup take rot join swap put ] is to-pile ( n s --> )
rot join
swap put ] is to-pile ( n s --> )
 
[ $ "" discards put
Line 1,598 ⟶ 1,595:
char R 26 of
char B 26 of join shuffle
26 times
[ behead tuck discards to-pile
behead rot char R =
Line 1,607 ⟶ 1,604:
[ emit sp ] cr
red-card take
black-card take
over size over size min random
say "Swapping " dup echo
say " cards." cr
dup dip [ split rot ] split
dip [ swapjoin rot ] join dip join
0 swap witheach
[ char R = if 1+ ]
0 rot witheach
[ char B = if 1+ ]
say "The assertion is "
= iff [ say "true." ]
else [ say "false." ] cr cr ] is task ( --> )