[Purdue-pm] Perl 6 Great List Refactor

Mark Senn mark at purdue.edu
Tue Oct 27 06:13:52 PDT 2015


(Thanks to Joe Kline for updating Perl 6 on our work computers.)

As a result of the recent "Great List Refactor" (also known as "GLR" or
"glr") semantic changes in Perl 6 in the past six months or so I had to
change my Perl 6 program from

    @string ==> map {.chars} ==> my @width;
    return @width.max;
    
to

    return max map {.chars}, @string;
    
or, and I like this better because it reads left to right,

    return (@string ==> map {.chars} ==> max);

I like Perl 6 much better than Perl 5.

-mark


More information about the Purdue-pm mailing list