Skip to content

Commit 744f652

Browse files
committed
Document the nothing return handling
1 parent 72dcda6 commit 744f652

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/systems/imperative_affect.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The NamedTuple returned from `f` includes the values to be written back to the s
2626
2727
Where we use Setfield to copy the tuple `m` with a new value for `x`, then return the modified value of `m`. All values updated by the tuple must have names originally declared in
2828
`modified`; a runtime error will be produced if a value is written that does not appear in `modified`. The user can dynamically decide not to write a value back by not including it
29-
in the returned tuple, in which case the associated field will not be updated.
29+
in the returned tuple, in which case the associated field will not be updated. To avoid writing back, either return `nothing` or an empty named tuple.
3030
"""
3131
@kwdef struct ImperativeAffect
3232
f::Any

0 commit comments

Comments
 (0)