From cfdc471535db9288be4b4de12be8455dd19f8d7f Mon Sep 17 00:00:00 2001 From: Flaviu Tamas Date: Sun, 30 Nov 2014 17:04:03 -0500 Subject: [PATCH] Update seqs.md --- content/seqs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/seqs.md b/content/seqs.md index 0dac240..e6b43ab 100644 --- a/content/seqs.md +++ b/content/seqs.md @@ -24,9 +24,9 @@ b = a[0] & b # Same as original b ``` -## Value semantics +## Immutability -Seqs have value semantics, so +While sequences are dynamiclly allocated, they are still immutable. ``` nimrod let a = @[1, 2, 3] @@ -40,7 +40,7 @@ var b = @[1, 2, 3] b.add(4) ``` -will work without any problems. If wanted, a seq can be passed to a method with the `var` annotation to make it modifiable, so +will work without any problems. If wanted, a seq can be passed to a method with the `var` or `ref` annotation to make it modifiable, so ``` nimrod proc foo(mySeq: var seq[int]) =