Re: Reductions, junctions, hashslices, and cribbage scoring

2005-05-26 Thread Rob Kinyon
> Assuming you write the subset coroutine above, how about > > $score += > ( subsets(0..4) ==> map { 2 * (15 == [+] @[EMAIL PROTECTED]) } ==> [+] ) Working on it last night and this morning, I ended up with the following, very similar rewrite. sub gen_idx_powerset (Int $size is copy) returns

Re: Reductions, junctions, hashslices, and cribbage scoring

2005-05-26 Thread John Williams
On Wed, 25 May 2005, Rob Kinyon wrote: > (This post references the discussion at > http://www.perlmonks.org/?node_id=458728, particularly dragonchild's > response at the bottom.) > > For those who don't know, cribbage is a game where each player has > access to 4 cards, plus a community card. Vari