docs.scala-lang icon indicating copy to clipboard operation
docs.scala-lang copied to clipboard

clarify wording on pure-functions overview to allow immutable hidden state, and add an example

Open epic-64 opened this issue 11 months ago • 1 comments

Updates the "pure functions" overview at https://docs.scala-lang.org/scala3/book/fp-pure-functions.html

  • adds clarification that accessing immutable hidden state is still considered pure
  • adds an example of this in form of a closure

epic-64 avatar Dec 21 '24 17:12 epic-64

there are still some typos, sorry, marking it as draft until they are fixed

epic-64 avatar Dec 21 '24 17:12 epic-64