type Lens[A, B] = LensFamily[A, A, B, B]
- Alphabetic
- By Inheritance
- Lens
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
LensLaw extends AnyRef
- Definition Classes
- LensFamily
Abstract Value Members
-
abstract
def
run(a: A1): IndexedStore[B1, B2, A2]
- Definition Classes
- LensFamily
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
%%=[C](s: IndexedState[B1, B2, C]): IndexedState[A1, A2, C]
- Definition Classes
- LensFamily
-
def
%=(f: (B1) ⇒ B2): IndexedState[A1, A2, B2]
Modify the portion of the state viewed through the lens and return its new value.
Modify the portion of the state viewed through the lens and return its new value.
- Definition Classes
- LensFamily
-
def
%==(f: (B1) ⇒ B2): IndexedState[A1, A2, Unit]
Modify the portion of the state viewed through the lens, but do not return its new value.
Modify the portion of the state viewed through the lens, but do not return its new value.
- Definition Classes
- LensFamily
-
def
***[C1, C2, D1, D2](that: LensFamily[C1, C2, D1, D2]): LensFamily[(A1, C1), (A2, C2), (B1, D1), (B2, D2)]
alias for
product
alias for
product
- Definition Classes
- LensFamily
-
def
->>-[C](f: ⇒ IndexedState[A1, A2, C]): IndexedState[A1, A2, C]
Sequence the monadic action of looking through the lens to occur before the state action
f
.Sequence the monadic action of looking through the lens to occur before the state action
f
.- Definition Classes
- LensFamily
-
def
:=(b: ⇒ B2): IndexedState[A1, A2, B2]
Set the portion of the state viewed through the lens and return its new value.
Set the portion of the state viewed through the lens and return its new value.
- Definition Classes
- LensFamily
-
def
<%=(f: (B1) ⇒ B2): IndexedState[A1, A2, B1]
Modify the portion of the state viewed through the lens and return its old value.
Modify the portion of the state viewed through the lens and return its old value. alias for
modo
- Definition Classes
- LensFamily
- Since
7.0.2
-
def
<:=(b: ⇒ B2): IndexedState[A1, A2, B1]
Set the portion of the state viewed through the lens and return its old value.
Set the portion of the state viewed through the lens and return its old value. alias for
assigno
- Definition Classes
- LensFamily
- Since
7.0.2
-
def
<=<[C1, C2](that: LensFamily[C1, C2, A1, A2]): LensFamily[C1, C2, B1, B2]
alias for
compose
alias for
compose
- Definition Classes
- LensFamily
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
=>=(f: (B1) ⇒ B2): (A1) ⇒ A2
- Definition Classes
- LensFamily
-
def
=>>=[X[_]](f: (B1) ⇒ X[B2])(implicit XF: Functor[X]): (A1) ⇒ X[A2]
- Definition Classes
- LensFamily
-
def
>-[C](f: (B1) ⇒ C): State[A1, C]
Map the function
f
over the value under the lens, as a state action.Map the function
f
over the value under the lens, as a state action.- Definition Classes
- LensFamily
-
def
>=>[C1, C2](that: LensFamily[B1, B2, C1, C2]): LensFamily[A1, A2, C1, C2]
alias for
andThen
alias for
andThen
- Definition Classes
- LensFamily
-
def
>>-[C](f: (B1) ⇒ IndexedState[A1, A2, C]): IndexedState[A1, A2, C]
Bind the function
f
over the value under the lens, as a state action.Bind the function
f
over the value under the lens, as a state action.- Definition Classes
- LensFamily
-
def
andThen[C1, C2](that: LensFamily[B1, B2, C1, C2]): LensFamily[A1, A2, C1, C2]
- Definition Classes
- LensFamily
-
def
apply(a: A1): IndexedStore[B1, B2, A2]
- Definition Classes
- LensFamily
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
assign(b: ⇒ B2): IndexedState[A1, A2, B2]
Set the portion of the state viewed through the lens and return its new value.
Set the portion of the state viewed through the lens and return its new value.
- Definition Classes
- LensFamily
-
def
assigno(b: ⇒ B2): IndexedState[A1, A2, B1]
Set the portion of the state viewed through the lens and return its old value.
Set the portion of the state viewed through the lens and return its old value.
- Definition Classes
- LensFamily
- Since
7.0.2
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
compose[C1, C2](that: LensFamily[C1, C2, A1, A2]): LensFamily[C1, C2, B1, B2]
Lenses can be composed
Lenses can be composed
- Definition Classes
- LensFamily
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMap[C](f: (B1) ⇒ IndexedState[A1, A2, C]): IndexedState[A1, A2, C]
Bind the function
f
over the value under the lens, as a state action.Bind the function
f
over the value under the lens, as a state action.- Definition Classes
- LensFamily
-
def
get(a: A1): B1
- Definition Classes
- LensFamily
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lensLaw: LensLaw
- Definition Classes
- LensFamily
-
def
lifts[C](s: IndexedState[B1, B2, C]): IndexedState[A1, A2, C]
Contravariantly map a state action through a lens.
Contravariantly map a state action through a lens.
- Definition Classes
- LensFamily
-
def
liftsNT: ~>[[γ$0$]IndexedStateT[B1, B2, [X]X, γ$0$], [γ$1$]IndexedStateT[A1, A2, [X]X, γ$1$]]
Contravariantly mapping the state of a state monad through a lens is a natural transformation
Contravariantly mapping the state of a state monad through a lens is a natural transformation
- Definition Classes
- LensFamily
-
def
map[C](f: (B1) ⇒ C): State[A1, C]
Map the function
f
over the lens as a state action.Map the function
f
over the lens as a state action.- Definition Classes
- LensFamily
-
def
mod(f: (B1) ⇒ B2, a: A1): A2
Modify the value viewed through the lens
Modify the value viewed through the lens
- Definition Classes
- LensFamily
-
def
modf[X[_]](f: (B1) ⇒ X[B2], a: A1)(implicit XF: Functor[X]): X[A2]
Modify the value viewed through the lens, returning a functor
X
full of results.Modify the value viewed through the lens, returning a functor
X
full of results.- Definition Classes
- LensFamily
-
def
modo(f: (B1) ⇒ B2): IndexedState[A1, A2, B1]
Modify the portion of the state viewed through the lens and return its old value.
Modify the portion of the state viewed through the lens and return its old value.
- Definition Classes
- LensFamily
- Since
7.0.2
-
def
modp[C](f: (B1) ⇒ (B2, C), a: A1): (A2, C)
Modify the value viewed through the lens, returning a
C
on the side.Modify the value viewed through the lens, returning a
C
on the side.- Definition Classes
- LensFamily
-
def
mods(f: (B1) ⇒ B2): IndexedState[A1, A2, B2]
Modify the portion of the state viewed through the lens and return its new value.
Modify the portion of the state viewed through the lens and return its new value.
- Definition Classes
- LensFamily
-
def
mods_(f: (B1) ⇒ B2): IndexedState[A1, A2, Unit]
Modify the portion of the state viewed through the lens, but do not return its new value.
Modify the portion of the state viewed through the lens, but do not return its new value.
- Definition Classes
- LensFamily
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
partial: PLensFamily[A1, A2, B1, B2]
A homomorphism of lens categories
A homomorphism of lens categories
- Definition Classes
- LensFamily
-
def
product[C1, C2, D1, D2](that: LensFamily[C1, C2, D1, D2]): LensFamily[(A1, C1), (A2, C2), (B1, D1), (B2, D2)]
Two disjoint lenses can be paired
Two disjoint lenses can be paired
- Definition Classes
- LensFamily
-
def
set(a: A1, b: B2): A2
- Definition Classes
- LensFamily
-
def
setf[X[_]](a: A1, b: X[B2])(implicit XF: Functor[X]): X[A2]
- Definition Classes
- LensFamily
-
def
st: State[A1, B1]
- Definition Classes
- LensFamily
-
def
sum[C1, C2](that: ⇒ LensFamily[C1, C2, B1, B2]): LensFamily[\/[A1, C1], \/[A2, C2], B1, B2]
Two lenses that view a value of the same type can be joined
Two lenses that view a value of the same type can be joined
- Definition Classes
- LensFamily
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unary_~: PLensFamily[A1, A2, B1, B2]
alias for
partial
alias for
partial
- Definition Classes
- LensFamily
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
xmapA[X1, X2](f: (A2) ⇒ X2)(g: (X1) ⇒ A1): LensFamily[X1, X2, B1, B2]
- Definition Classes
- LensFamily
-
def
xmapB[X1, X2](f: (B1) ⇒ X1)(g: (X2) ⇒ B2): LensFamily[A1, A2, X1, X2]
- Definition Classes
- LensFamily
-
def
xmapbA[X, A >: A2 <: A1](b: Bijection[A, X]): LensFamily[X, X, B1, B2]
- Definition Classes
- LensFamily
-
def
xmapbB[X, B >: B1 <: B2](b: Bijection[B, X]): LensFamily[A1, A2, X, X]
- Definition Classes
- LensFamily
-
def
|||[C1, C2](that: ⇒ LensFamily[C1, C2, B1, B2]): LensFamily[\/[A1, C1], \/[A2, C2], B1, B2]
Alias for
sum
Alias for
sum
- Definition Classes
- LensFamily