A thread-safe, atomically updatable mutable reference.
A thread-safe, atomically updatable mutable reference.
Cribbed from the IORef
defined in oncue/remotely, an Apache 2 licensed
project: https://github.com/oncue/remotely
Accept a value (forcing the argument expression to be evaluated for its effects), and then discard it, returning Unit.
Accept a value (forcing the argument expression to be evaluated for its effects), and then discard it, returning Unit. Makes it explicit that you're discarding the result, and effectively suppresses the "NonUnitStatement" warning from wartremover.
liftM
as a natural transformation
liftM
as a natural transformation
TODO: PR to scalaz
Nicely formatted, order-preserving, 2-space indented.
Nicely formatted, order-preserving, 2-space indented.
point
as a natural transformation
Lift a State
computation to operate over a "larger" state given a Lens
.
Lift a State
computation to operate over a "larger" state given a Lens
.
NB: Uses partial application of F[_]
for better type inference, usage:
zoomNT[F](lens)
A shorter name for the identity function.
A shorter name for the identity function.
A shorter name for the constant function of 1, 2, 3, or 6 args.
A shorter name for the constant function of 1, 2, 3, or 6 args.
NB: the argument is eager here, so use _ => ...
instead if you need it to be thunked.
Probably not useful; implemented here mostly because it's amusing.
Probably not useful; implemented here mostly because it's amusing.