|
Scala example source code file (MonadListen.scala)
The MonadListen.scala Scala example source codepackage scalaz trait MonadListen[F[_], W] extends MonadTell[F, W] { def listen[A](ma: F[A]): F[(A, W)] def pass[A](ma: F[(A, W => W)]): F[A] = bind(listen(ma)){ case ((a, f), w) => writer(f(w), a) } val monadListenSyntax = new scalaz.syntax.MonadListenSyntax[F, W]{def F = MonadListen.this} } object MonadListen { def apply[F[_], W](implicit ML: MonadListen[F, W]) = ML } Other Scala examples (source code examples)Here is a short list of links related to this Scala MonadListen.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.