Skip to content

Commit

Permalink
Alias the disambiguations
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Jun 28, 2023
1 parent 1987e3a commit 02a43a6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/shared/src/main/scala/cats/effect/IOLocal.scala
Original file line number Diff line number Diff line change
Expand Up @@ -183,25 +183,25 @@ sealed trait IOLocal[A] {
/**
* Replaces the current value with `value`, returning the previous value.
*
* The combination of [[get]] and [[set(value:*]].
* The combination of [[get]] and [[set(value:* set]].
*
* @see
* [[get]]
* @see
* [[set(value:*]]
* [[set(value:* set]]
*/
final def getAndSet(value: A): IO[A] =
IO.Local(state => (set(state, value), getOrDefault(state)))

/**
* Replaces the current value with the initial value, returning the previous value.
*
* The combination of [[get]] and [[reset:*]].
* The combination of [[get]] and [[reset:* reset]].
*
* @see
* [[get]]
* @see
* [[reset:*]]
* [[reset:* reset]]
*/
final def getAndReset: IO[A] =
IO.Local(state => (reset(state), getOrDefault(state)))
Expand All @@ -213,7 +213,7 @@ sealed trait IOLocal[A] {
* All changes to the original value will be visible via lens getter and all changes applied
* to 'refracted' value will be forwarded to the original via setter.
*
* Note that [[.set(value*]] method requires special mention: while from the `IOLocal[B]`
* Note that [[.set(value* set]] method requires special mention: while from the `IOLocal[B]`
* point of view old value will be replaced with a new one, from `IOLocal[A]` POV old value
* will be updated via setter. This means that for 'refracted' `IOLocal[B]` use of `set(b)` is
* equivalent to `reset *> set(b)`, but it does not hold for original `IOLocal[A]`:
Expand Down

0 comments on commit 02a43a6

Please sign in to comment.