I’m unable to define a `Functor`

for my `abstract class Foo[V : Monoid]`

that have a type constraint. this is because of the `map`

method of `Functor`

which takes a `B`

parameters which is not a `Monoid`

.

My question is how and where can I add such constraint ?

Here’s a sample from what I’m trying to do :

```
import cats.Functor
import cats.kernel.Monoid
abstract class Foo[A : Monoid] {
val a: A
}
object Foo {
implicit def FooFunctor = new Functor[Foo] {
override def map[A, B](fa: Foo[A])(f: (A) => B) = new Foo[B] {
override val a: B = f(fa.a)
}
}
}
```

this raise the following exception :

```
Error:(12, 59) could not find implicit value for evidence parameter of type cats.kernel.Monoid[B]
override def map[A, B](fa: Foo[A])(f: (A) => B) = new Foo[B] {
```

My first solution was adding the constraint in the `map`

definition (`override def map[A, B : Monoid]`

) but this is not legal because this will change the definition of the function in `Functor`

and will raise the Exception :

```
Error:(12, 18) method map overrides nothing.
```

Can anyone please help me get out of this ? any suggestion would be appreciated.