Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
7
Task/Enforced-immutability/Nim/enforced-immutability.nim
Normal file
7
Task/Enforced-immutability/Nim/enforced-immutability.nim
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
var x = "mutablefoo" # Mutable variable
|
||||
let y = "immutablefoo" # Immutable variable, at runtime
|
||||
const z = "constantfoo" # Immutable constant, at compile time
|
||||
|
||||
x[0] = 'M'
|
||||
y[0] = 'I' # Compile error: 'y[0]' cannot be assigned to
|
||||
z[0] = 'C' # Compile error: 'z[0]' cannot be assigned to
|
||||
Loading…
Add table
Add a link
Reference in a new issue