Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created June 10, 2016 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dogbert17/d6bc80230a7832f50202b76ca7a27c4a to your computer and use it in GitHub Desktop.
Save dogbert17/d6bc80230a7832f50202b76ca7a27c4a to your computer and use it in GitHub Desktop.
Attempt to document Baggy.elems
=head2 method elems
Defined as:
method elems(Baggy:D:) returns Int:D
Returns the number of elements in the C<Baggy> object without
taking the individual elements weight into account.
my $breakfast = bag <eggs spam spam spam>;
say $breakfast.elems; # 2
my $n = ("b" => 9.4, "b" => 2).MixHash;
say $n.elems; # 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment