On Sun, May 26, 2013 at 02:37:24PM +0200, Moritz Lenz wrote: > On 05/26/2013 12:49 PM, Marc Chantreux wrote: > > say [+] > > ('a'..'z')\ > > .pairs\ > > .map: { 1 + .key if .value ~~ any < m a t h > } > > > > i already know i have to get used to the anoying \ at the end of the > > lines but i'm pretty sure there are plenty ways to make this expression > > shorter.
many thanks, all perl6 hackers from this nice channel :) > masak took this to #perl6: > http://irclog.perlgeek.de/perl6/2013-05-26#i_7117450 > My solution, with a bit of help from masak: > say [+] <m a t h>ยป.ord X- ('a'.ord - 1) X- on a 1 element array is clever! thanks for the tip! > Other approaches have been developed too, it's worth reading the logs :-) totally agreed: i learned about it. regards -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln