First, let's have a look at scalaz.Apply
def ap[A,B](fa: => F[A])(f: => F[A => B]): F[B]
If I use the above comment on scalaz.Apply (instead of scalaz.Bind),
... I can identify a lifted function, namely f.
... I can identify the introduction of new values, namely values of type B
... I cannot identify a new functor context, there is only one context, namely F.
... I am unclear about "the lift context"
Well, as this comment is for scalaz.Bind and not for scalaz.Apply and as scalaz.Bind extends scalaz.Apply, it's OK that this comment only partially fits at this place.
So, let’s move on and have a look at scalaz.Bind
def bind[A, B] (fa: F[A]) (f: A => F[B]): F[B]
... I cannot identify a lifted function; f is not a lifted function;
... I can identify the introduction of new values, namely values of type F[B]
... I cannot identify a new functor context, there is only one context, namely F.
I guess one of my main problems is, that I do not quite understand the term “new” here. In other words, my main concerns are with "a new functor context".
Does "new" refer to immutability?
Let's consider List:
def bind[A, B] (fa: List[A]) (f: A => List[B]): List[B]
If "new functor context" refers to the fact, that for each element a of the list fa a new list (of type List[B]) is created (due to immutability of fa), than I'm more or less fine with it…
However I still think that "new" is a bit misleading here. It's still the same type of context (it's still a List) but a new instance of such a context is created. For me, a "new context" would be something different from List — but also forming a Bind — e.g., Option.
Hope one can clear things up a little bit for me ;-) In the end, I’d like to fully understand the comment on scalaz.Bind.