| career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (MonadListenSyntax.scala)

This example Scala source code file (MonadListenSyntax.scala) is included in the "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Scala by Example" TM.

Learn more about this Scala project at its project page.

Java - Scala tags/keywords

monadlistensyntax, monadtellsyntax, tomonadlistenops, tomonadtellops

The MonadListenSyntax.scala Scala example source code

package scalaz
package syntax

final class MonadListenOps[F[_], W, A] private[syntax](self: F[A])(implicit ML: MonadListen[F, W]) {

  final def written: F[W] ={ case (_, w) => w }

  final def listen: F[(A, W)] =

trait ToMonadListenOps extends ToMonadTellOps {
  implicit def ToMonadListenOps[F[_], A, W](v: F[A])(implicit F0: MonadListen[F, W]) =
    new MonadListenOps[F, W, A](v)(F0)

trait MonadListenSyntax[F[_], W] extends MonadTellSyntax[F, W] {
  implicit def ToMonadListenOps[A](v: F[A])(implicit F0: MonadListen[F, W]) =
    new MonadListenOps[F, W, A](v)(F0)

Other Scala examples (source code examples)

Here is a short list of links related to this Scala MonadListenSyntax.scala source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller


new blog posts


Copyright 1998-2021 Alvin Alexander,
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.