<p dir="ltr">I'm without a doubt overlooking something, but couldn't this be (otoh)</p>
<p dir="ltr">    fmap' :: Functor f => (a -> b) -> f a -> f b<br>
    fmap' f = fmap (strictify f)<br>
      where<br>
        strictify s = (($!) id) . s</p>
<p dir="ltr">Nicolas</p>
<div class="gmail_quote">On Nov 30, 2013 12:11 AM, "Edward Kmett" <<a href="mailto:ekmett@gmail.com">ekmett@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Figure out how to write one using either of those APIs, and I'll be quite impressed. =)<div><br></div><div>I personally use this quite often when working in a monad, in lieu of `return $!` games.</div><div>

<br></div><div>The argument for implementing a version of it in terms of Monad and not some new class off to the side of the class hierarchy that Monad doesn't subclass is that, frankly, if such a thing existed, I'd still have to use this combinator anyways when working with a transformer stack, etc. and would derive little benefit.</div>

<div><br></div><div>-Edward</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 29, 2013 at 12:03 PM, Carter Schonwald <span dir="ltr"><<a href="mailto:carter.schonwald@gmail.com" target="_blank">carter.schonwald@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">could someone explain to me why this <$!> would be for monads rather being more generally also for functors or applicatives?</div>

<div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Fri, Nov 29, 2013 at 10:35 AM, Johan Tibell <span dir="ltr"><<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>></span> wrote:<br>



</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">I'm trying to figure out whether this is a property of the functor itself. I guess it is, but at the same time it seems somewhat orthogonal whether to `seq` some value`.</div>



<div><div><div class="gmail_extra"><br>

<br><div class="gmail_quote">On Fri, Nov 29, 2013 at 3:50 PM, Twan van Laarhoven <span dir="ltr"><<a href="mailto:twanvl@gmail.com" target="_blank">twanvl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div>On 29/11/13 12:23, Johan Tibell wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
On Fri, Nov 29, 2013 at 1:19 PM, Twan van Laarhoven <<a href="mailto:twanvl@gmail.com" target="_blank">twanvl@gmail.com</a><br></div><div>
<mailto:<a href="mailto:twanvl@gmail.com" target="_blank">twanvl@gmail.com</a>>> wrote:<br>
<br>
    I don't like that this function is implemented for Monads, I think that it<br>
    makes sense for some other functors as well. Though to do this 'properly' we<br>
    would probably end up with another typeclass "StrictFunctor" or something,<br>
    and that is perhaps too much unnecessary complexity.<br>
<br>
<br>
Do you have an example of such a functor?<br>
<br>
-- Johan<br>
</div></blockquote>
<br>
The first thing that came to mind was ZipList. Perhaps a more realistic example would be parsing combinator or FRP libraries that are applicative but not monadic.<span><font color="#888888"><br>
<br>
<br>
Twan<br>
</font></span></blockquote></div><br></div>
</div></div><br></div></div><div>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
<br></div></blockquote></div><br></div>
<br>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
<br></blockquote></div>