Search a list of records: Difference between revisions
m
fix mislabled language block
Thundergnat (talk | contribs) m (Fix Perl 6 -> Raku links) |
Thundergnat (talk | contribs) m (fix mislabled language block) |
||
Line 1,828:
The CPAN module <tt>List::MoreUtils</tt> provides the <tt>first_index</tt> function which could be used to write that first case more elegantly:
<lang
$index1 = first_index { $_->{name} eq 'Dar Es Salaam' } @cities;</lang>
|