Jump to content

Search a list: Difference between revisions

m
Fix Perl 6 -> Raku links
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
m (Fix Perl 6 -> Raku links)
Line 3,067:
</pre>
 
The built-in method <code>.first</code> takes a [https://docs.perl6raku.org/language/operators#infix_~~ smart-matcher], and returns the first matching list element.<br>
The <code>:k</code> adverb tells it to return the key (a.k.a. list index) instead of the value of the matching element.<br>
The <code>:end</code> adverb tells it to start searching from the end of the list.<br>
10,339

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.