Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. my $materials = bag flat 'wood' xx 300, 'glass' xx 100, 'brick' xx 3000;
  2.  
  3. my @wanted =
  4. bag(flat 'wood' xx 200, 'glass' xx 50, 'brick' xx 3000) but "house",
  5. bag(flat 'wood' xx 100, 'glass' xx 50) but "shed",
  6. bag( 'wood' xx 50) but "dog-house";
  7.  
  8. say 'I can build...';
  9. .put for @wanted.combinations.grep: { $materials ≽ [⊎] |$^stuff-we-want };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement