in reply to Re (tilly) 1: (Golf) Building a Better Binary Tree
in thread (Golf) Building a Better Binary Tree
You can eliminate calling $s as a function (and the argument passing) and it will still work for the test cases i've been using. Is there a reason not to do that? That is, is there a reason to use the full function call when passing the function ref will work?
If you pulled that out, you would get:
at 45 characters.#23456789012345678901234567890123456789012345 $x=0;$s=shift;$x={$_,[$x,0]}for sort$s @_;%$x
jynx
update: alas, this is a false optimization. Thank you tilly for correcting my eyesight :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 3: (Golf) Building a Better Binary Tree
by tilly (Archbishop) on Oct 09, 2001 at 22:27 UTC |