Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created December 5, 2016 19:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save zoffixznet/ff9097cff1152fc1e08606db747f7493 to your computer and use it in GitHub Desktop.
my $materials = bag flat 'wood' xx 300, 'glass' xx 100, 'brick' xx 3000;
my @wanted =
house => bag(flat 'wood' xx 200, 'glass' xx 50, 'brick' xx 3000),
shed => bag(flat 'wood' xx 300, 'glass' xx 50, 'brick' xx 3000),
dog-house => bag( 'wood' xx 50);
say 'I can build...';
.say for @wanted.combinations.grep: { dd $^stuff».values };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment