Skip to content

Instantly share code, notes, and snippets.

View retupmoca's full-sized avatar

Andrew Egeler retupmoca

View GitHub Profile
class Board::Cell {
has @.possible;
method clone {
my @new = @!possible;
self.new(:possible(@new));
}
method remove-possible($num) {
if $.solved && $.value == $num {
@retupmoca
retupmoca / gist:01d09301ac7fc3fd2013
Last active December 2, 2015 15:48
PERL6LIB doesn't like listing already existing repo paths (in powershell)
> perl6 -e 'my $t = $*REPO; while $t { say $t; $t .= next-repo }'
inst#C:\Users\Andrew\.perl6\2015.11-311-gf94c31e
inst#C:\users\andrew\development\p6bin\share\perl6\site
inst#C:\users\andrew\development\p6bin\share\perl6\vendor
inst#C:\users\andrew\development\p6bin\share\perl6
> $env:PERL6LIB = "file#a,file#b"
> perl6 -e 'my $t = $*REPO; while $t { say $t; $t .= next-repo }'
file#C:\Users\Andrew\Development\rakudo\a
(defun unsolvable-p (list)
(let (island-1 in-island)
(flet ((island-fails () (if in-island
(if island-1
(clearf island-1 in-island)
t)
nil)))
(dolist (x list)
(if (null x)
(when (island-fails)