Created
May 29, 2012 20:49
-
-
Save gfldex/2830624 to your computer and use it in GitHub Desktop.
i can haz UCI?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
subset HTMLColor of Str where { * ~~ / <:hexdigit> ** 6 / }; | |
sub alternator (HTMLColor $a is copy, HTMLColor $b is copy){ | |
return sub () { | |
return (($a, $b) = ($b, $a))[0]; | |
} | |
} | |
my $bg_color := alternator('#00aa00', '#00bb00'); | |
say $bg_color() for 1..10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment