Skip to content

Instantly share code, notes, and snippets.

@Siddhant
Created May 21, 2012 15:38
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 Siddhant/2762953 to your computer and use it in GitHub Desktop.
Save Siddhant/2762953 to your computer and use it in GitHub Desktop.
my @array = 1, 2;
for @array -> $n {
$n.say;
@array.push: $n + 2;
}
say @rray;
------------------------------------
array = [1, 2]
for n in array:
print n;
array.append(n+2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment