Enforced immutability: Difference between revisions

Content added Content deleted
m (Regularize header markup to recommended on category page)
m (→‎{{header|F Sharp|F#}}: fix heading, as suggested on the Count examples/Full list/Tier 4 talk page)
Line 406: Line 406:
constant str = "immutable string"</lang>
constant str = "immutable string"</lang>


=={{header|F Sharp|F#}}==
=={{header|F_Sharp|F#}}==
As a functional language, everything in F# is immutable by default. Interestingly, <code>const</code> is a reserved word but is non-functional.
As a functional language, everything in F# is immutable by default. Interestingly, <code>const</code> is a reserved word but is non-functional.
<lang fsharp>let hello = "Hello!"</lang>
<lang fsharp>let hello = "Hello!"</lang>