Skip to content

Commit c698369

Browse files
authored
Merge pull request #19 from JuliaObjects/jw3126-patch-1
Update optics.jl
2 parents 2e1b708 + 37edf7c commit c698369

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/optics.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const EXPERIMENTAL = """This function/method/type is experimental. It can be cha
1414
"""
1515
modify(f, obj, optic)
1616
17-
Replace a deeply nested part `x` of `obj` by `f(x)`.
17+
Replace a part `x` of `obj` by `f(x)`. The `optic` argument selects
18+
which part to replace.
1819
1920
```jldoctest
2021
julia> using Accessors
@@ -29,9 +30,9 @@ See also [`set`](@ref).
2930
function modify end
3031

3132
"""
32-
set(optic, obj, val)
33+
set(obj, optic, val)
3334
34-
Replace a deeply nested part of `obj` by `val`.
35+
Replace a part according to `optic` of `obj` by `val`.
3536
3637
```jldoctest
3738
julia> using Accessors

0 commit comments

Comments
 (0)