Skip to content

Commit

Permalink
Merge pull request JuliaObjects#19 from JuliaObjects/jw3126-patch-1
Browse files Browse the repository at this point in the history
Update optics.jl
  • Loading branch information
jw3126 authored Mar 23, 2021
2 parents 12cb1d2 + c207cfd commit 187aa28
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/optics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const EXPERIMENTAL = """This function/method/type is experimental. It can be cha
"""
modify(f, obj, optic)
Replace a deeply nested part `x` of `obj` by `f(x)`.
Replace a part `x` of `obj` by `f(x)`. The `optic` argument selects
which part to replace.
```jldoctest
julia> using Accessors
Expand All @@ -29,9 +30,9 @@ See also [`set`](@ref).
function modify end

"""
set(optic, obj, val)
set(obj, optic, val)
Replace a deeply nested part of `obj` by `val`.
Replace a part according to `optic` of `obj` by `val`.
```jldoctest
julia> using Accessors
Expand Down

0 comments on commit 187aa28

Please sign in to comment.