ComonadTraced
public protocol ComonadTraced : Comonad
The ComonadTraced type class represents those comonads which support relative (monoidal) position information.
-
Index type to access values inside the Comonad
Declaration
Swift
associatedtype M
-
Gets a value that depends on the current position.
Declaration
Parameters
wa
Trace.
f
Function to compute a value from the current position.
Return Value
A tuple with the current and computed value in the context of this ComonadTraced.
-
traces(_:_:)
Extension methodExtracts a value at a relative position which depends on the current value.
Parameters
wa
Trace.
f
Function to compute the position based on the current value.
Return Value
Value corresponding to the new position.
-
listen(_:)
Extension method -
censor(_:_:)
Extension method