Difference in capability between fmap and bind?
<p>I'm new to functional programming (coming from javascript), and I'm having a hard time telling the difference between the two, which is also messing with my understand of functors vs. monads.</p>

<p>Functor:</p>

<pre><code>class Functor f where
    fmap :: (a -&gt; b) -&gt; f a -&gt; f b
</code></pre>

<p>Monad (simplified):</p>

<pre><code>class Monad m where
    (&gt;&gt;=) :: m a -&gt; (a -&gt; m b) -&gt; m b
</code></pre>

<ul>
<li><code>fmap</code> takes a function and a functor, and returns a functor.</li>
<li><code>&gt;&gt;=</code> takes a function and a monad, and returns a monad.</li>
</ul>

<p>The difference between the two is in the function parameter:</p>

<ul>
<li><code>fmap</code> - <code>(a -&gt; b)</code></li>
<li><code>&gt;&gt;=</code> - <code>(a -&gt; m b)</code></li>
</ul>

<p><code>&gt;&gt;=</code> takes a function parameter that returns a monad. I know that this is significant, but I'm having difficulty seeing how this one slight thing makes monads much more powerful than functors. Can someone explain?</p>