Lift your Any into the Identity monad?
--
Cheers,
√
--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-language+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Cool! Another
class Monad[T](val x : T) {
def >>=[S](f : T => S) : Monad[S] = {
new Monad(f(x))
}
override def toString = String.valueOf(x)
}
object Monad {
def apply[T](t : T) : Monad[T] = {
new Monad(t)
}
}
implicit def anyToMonad[T](x : T): Monad[T] = new Monad[T](x)
--
You received this message because you are subscribed to a topic in the Google Groups "scala-language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-language/OoI5jYiszYI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-language+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-language+unsubscribe@googlegroups.com.