Skip to content

Instantly share code, notes, and snippets.

@lizmat
Created September 13, 2022 12:00
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 lizmat/39dfb5bb4a833bbf11e1d3cc40294b9c to your computer and use it in GitHub Desktop.
Save lizmat/39dfb5bb4a833bbf11e1d3cc40294b9c to your computer and use it in GitHub Desktop.
inconsistent results
use nqp;
my $h := nqp::hash;
nqp::bindkey($h, "a", 1);
nqp::bindkey($h, "b", 2);
nqp::bindkey($h, "c", 3);
my $iter := nqp::iterator($h);
nqp::bindkey($h, "d", 4);
nqp::bindkey($h, "e", 5);
nqp::while(
$iter,
nqp::deletekey($h,nqp::iterkey_s(nqp::shift($iter)))
);
dd $h
@lizmat
Copy link
Author

lizmat commented Sep 15, 2022

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment