Perl 6 Perl 6 Lists and Arrays vivified #34

A note about .elems

> say @a.elems;

The elems function tends to make things non-lazy

This includes unary + on arrays

Avoid things like:

if +@a { say '@a is not empty' }
# ...and it's no longer lazy!

Better:

if ?@a { say '@a is not empty' }
if  @a { say '@a is not empty' }
continued...
Copyright © 2012
http://www.pmichaud.com/2012/pres/