Skip to content

Commit 0b41e11

Browse files
authored
Rewrite paragraph about set immutability (#792)
In the docs of the overview of Set there is a paragraph on their immutability. This patch rewrites that paragraph for improved clarity and to fix some grammatical errors.
1 parent 06f9214 commit 0b41e11

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

containers/docs/set.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ provided by the ``containers`` package: :haddock:`/Data.Set` and
2323
mechanism.
2424

2525

26-
All of these implementations are *immutable* which means that any update
27-
functions do not modify the set that you passed in, they creates a new set. In
28-
order to keep the changes you need to assign it to a new variable. For example::
26+
Sets are *immutable*. Any function on a set that changes values in the container
27+
actually creates a new set. In order to keep the changes, you need to assign
28+
the result of the operation to a new variable. For example::
2929

3030
let s1 = Set.fromList ["a", "b"]
3131
let s2 = Set.delete "a" s1

0 commit comments

Comments
 (0)