Hi Chen,
You might not know that Eric Torreborre has translated this paper
to Scala:
https://etorreborre.blogspot.com.au/2011/06/essence-of-iterator-pattern.html
To answer your question, to represent (∀a. m a → g m a) you write
something like:
trait HaveToThinkUpAName[M[_], G[_[_], _] {
def apply[A](names: M[A]): G[M, A]
} // not type-checked, straight from head
The position of the forall quantifier (∀) informs where the type
variables go in the translation.
--
You received this message because you are subscribed to the Google Groups "Melbourne Scala User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-melb+...@googlegroups.com.
To post to this group, send email to scala...@googlegroups.com.
Visit this group at https://groups.google.com/group/scala-melb.
For more options, visit https://groups.google.com/d/optout.
Wow, coming from you, that makes me both happy and proud!
trait AppAdapter[G[_[_], _], M[_]] { | |
def insert[A]: M[A] => G[M, A] | |
def retrieve[A]: G[M, A] => M[A] | |
} |