Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use MONKEY_TYPING; # Needed to do runtime augmentation of a base class.
|
||||
use MONKEY-TYPING; # Needed to do runtime augmentation of a base class.
|
||||
|
||||
augment class Any {
|
||||
method nsort { self.list.sort: {$^a.lc.subst(/(\d+)/,->$/{0~$0.chars.chr~$0},:g)~"\x0"~$^a} }
|
||||
augment class List {
|
||||
method nsort { self.list.sort: {$^a.lc.subst(/(\d+)/, -> $/ {0 ~ $0.chars.chr ~ $0 }, :g) ~ "\x0" ~ $^a} }
|
||||
};
|
||||
|
||||
say ~<a201st a32nd a3rd a144th a17th a2 a95>.nsort;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue