in reply to Re: Prototype like sort()?
in thread Prototype like sort()?
Others explained that not all builtins' APIs can be copied by using prototypes.
But if you are willing to combine your rank with another modifier sub like by with prototype, you could form compound statements like
rank LIST; rank by BLOCK LIST; rank by {SUBNAME} LIST;
I find this more readable than your original approach.
If acceptable, I could elaborate further on a clean implementation.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Prototype like sort()?
by perlancar (Hermit) on Feb 05, 2018 at 05:14 UTC | |
by LanX (Sage) on Feb 05, 2018 at 08:40 UTC | |
by perlancar (Hermit) on Feb 05, 2018 at 10:15 UTC | |
by LanX (Sage) on Feb 05, 2018 at 10:18 UTC |
In Section
Seekers of Perl Wisdom