Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

answer another question

  • Loading branch information...
commit 26956682e50f303d4afb6c92a8119ab5bc47c548 1 parent 6a76d0b
@moritz moritz authored
Showing with 10 additions and 2 deletions.
  1. +8 −0 answers.md
  2. +2 −2 questions
View
8 answers.md
@@ -32,3 +32,11 @@ If you want to do it anyway, you can abuse autothreading for that:
say eigenstates(1|2|3).join(', ');
# prints 1, 2, 3 or a permutation thereof
+
+
+## If Str is immutable, how does `s///` work? if Int is immutable, how does `$i++` work?
+
+In Perl 6, many basic types are immutable, but the variables holding them are
+not. The `s///` operator works on a variable, into which it puts a newly
+creates string object. Likewise `$i++` works on the `$i` variable, not
+just on the value in it.
View
4 questions
@@ -5,8 +5,6 @@ Language features/builtins
dereference array refs? if my $x = (0, 1); say $x[0] works, why use @x
instead?
* are Perl 6 threads better than Perl 5 threads?
-* if Str is immutable, how does s/// work? if Int is immutable, how does $i++
- work?
Meta:
@@ -17,3 +15,5 @@ ANSWERED:
* what is &so?
* how do I extract the eigenstates from a junction?
+* if Str is immutable, how does s/// work? if Int is immutable, how does $i++
+ work?
Please sign in to comment.
Something went wrong with that request. Please try again.