2024-10-16 18:07:41 -07:00
|
|
|
^|in EMal strings are mutable|^
|
|
|
|
|
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] ← ","
|
2023-07-01 11:58:00 -04:00
|
|
|
ref.append("!") # texts are coercible and growable
|
|
|
|
|
copied += "?"
|
2024-10-16 18:07:41 -07:00
|
|
|
writeLine(original æ ref and original æ "Hello, world!")
|
|
|
|
|
writeLine(copied æ "Yellow world?")
|