Jump to content

Queue/Definition: Difference between revisions

m
→‎{{header|Perl}}: future-proof for 5.36, explicit :prototype
m (Order of sections.)
m (→‎{{header|Perl}}: future-proof for 5.36, explicit :prototype)
Line 4,783:
 
<syntaxhighlight lang="perl">use Carp;
sub mypushmy push :prototype(\@@) {my($list,@things)=@_; push @$list, @things}
sub mypopmaypop :prototype(\@) {my($list)=@_; @$list or croak "Empty"; shift @$list }
sub empty :prototype(@) {not @_}</syntaxhighlight>
 
Example:
2,392

edits

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