in reply to Re: Re: (Golf) Dependency List Prioritization
in thread (Golf) Dependency List Prioritization

I hope you don't mind me removing a few bytes:

sub f{for(values(%h=@_)){$h{$_}||=[]for@$_}sort{(grep/^$b$/,@{$h{$a}}) +||-1}keys%h}
(Note: I didn't test)

U28geW91IGNhbiBhbGwgcm90MTMgY
W5kIHBhY2soKS4gQnV0IGRvIHlvdS
ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
geW91IHNlZSBpdD8gIC0tIEp1ZXJk

Replies are listed 'Best First'.
Re (tilly) 4: (Golf) Dependency List Prioritization
by tilly (Archbishop) on Mar 15, 2002 at 15:42 UTC
    If you test, you will find it doesn't compile.

      If you test, you will find it doesn't compile.

      Perl doesn't DWIM :(
      It was worth a try, it was not worth a post. I should have tested first.

      U28geW91IGNhbiBhbGwgcm90MTMgY
      W5kIHBhY2soKS4gQnV0IGRvIHlvdS
      ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
      geW91IHNlZSBpdD8gIC0tIEp1ZXJk