Skip to content

Commit 8f54cdb

Browse files
authored
Merge pull request #44 from chexxor/patch-1
Explain how the Record Builder is safe
2 parents d6af968 + b7d5c35 commit 8f54cdb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Record/Builder.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ foreign import unsafeRename :: forall r1 r2. String -> String -> Record r1 -> Re
2929
-- | fields in-place, instead of using `insert` and repeatedly generating new
3030
-- | immutable records which need to be garbage collected.
3131
-- |
32+
-- | The mutations accumulated in a `Builder` are safe because intermediate states can't be
33+
-- | observed. These mutations, then, are performed all-at-once in the `build` function.
34+
-- |
3235
-- | The `Category` instance for `Builder` can be used to compose builders.
3336
-- |
3437
-- | For example:

0 commit comments

Comments
 (0)