There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

sudo ,

No. Persistent Data Structures are not mutable. The memory space of an older version is not rewritten, it is referenced by the newer version as a part of its definition. ie via composition. It can only safely do this if the data it references is guaranteed to not change.


<span style="color:#323232;">x </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#0086b3;">2 </span><span style="font-weight:bold;color:#a71d5d;">:: </span><span style="color:#0086b3;">1 </span><span style="font-weight:bold;color:#a71d5d;">:: </span><span style="color:#0086b3;">Nil </span><span style="font-style:italic;color:#969896;">-- [2, 1]
</span><span style="color:#323232;">y </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#0086b3;">3 </span><span style="font-weight:bold;color:#a71d5d;">::</span><span style="color:#323232;"> x </span><span style="font-style:italic;color:#969896;">-- [3, 2, 1]
</span>

In this example both x and y are single linked lists. y is a node with value 3 and a pointer to x. If x was mutable then changing x would change y. That’s bad™ so its not allowed.

If you want to learn more about functional programming I suggest reading Structures and Interpretation of Computer Programs or Learn You a Haskell for Great Good

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines