Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Copy-a-string/EMal/copy-a-string.emal
Normal file
11
Task/Copy-a-string/EMal/copy-a-string.emal
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
text original = "Yellow world"
|
||||
text ref = original # copying the reference
|
||||
text copied = *original # copying the content
|
||||
original[0] = "H" # texts are indexable and mutable
|
||||
original[5] = ","
|
||||
ref.append("!") # texts are coercible and growable
|
||||
copied += "?"
|
||||
^|
|
||||
| original == ref == "Hello, world!"
|
||||
| copied == "Yellow world?"
|
||||
|^
|
||||
Loading…
Add table
Add a link
Reference in a new issue