Discord is now Scala’s main chat platform. Please join us at https://discord.com/invite/scala
Monoid[T]
with anything that has a type parameter and explicit instances, and your question remains the same
Monoid[Int]
, you know that the Monoid is for Int
Model
State
, but you don't know which State
Model
without knowing its State
, you could do that with universal types too no?
_
you are using there doesn't mean what you think it means
def f[Model[_]] = ???
def f(model: Model[_]) = ???
f
takes a value of type Model
but doesn't care what State
is
forSome
thing (which however is going away)
def f(model: Model[A] forSome { type A })