Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Perl6

Name: Anonymous 2011-02-12 6:10

Fibonacci in Perl6.

my @fib := (0, 1, *+* ... *);

Can your toy language do this?

Name: Anonymous 2011-02-12 8:49

>>1
My toy language can do this:

my@d=((<♦ ♠ ♥ ♣>X~(2..10,<J Q K A>))Z=>[2..9,10 xx 4,1|11]).pick(*);my@p=[],[];sub a{@^c.push(@d.pop)};sub b{[+]@^c».value};for@p {.&a;.&a;say '-'x 33;loop {if .&b!<22 {"{$_».key} > 21".say;last};say .&b,"\n{$_».key}";last if prompt('(h)it (s)it? ')~~'s';.&a}};say 'Winner:'~ %([max]@p.grep({.&b<22})).keys

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List