<div dir="ltr">Agreed on all counts.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 5, 2014 at 3:35 PM, Brent Yorgey <span dir="ltr"><<a href="mailto:byorgey@seas.upenn.edu" target="_blank">byorgey@seas.upenn.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Wed, Mar 05, 2014 at 03:22:39PM -0800, David Thomas wrote:<br>
> It's a function of zero arguments.<br>
<br>
</div>This is really stretching the meaning of the word "function" beyond<br>
any reasonable, useful definition, in my opinion.  See the discussion<br>
here:<br>
<br>
  <a href="http://conal.net/blog/posts/everything-is-a-function-in-haskell" target="_blank">http://conal.net/blog/posts/everything-is-a-function-in-haskell</a><br>
<br>
A much more useful (and precise) point of view is that in Haskell, all<br>
functions take exactly one argument.  Under that view, of course,<br>
there is no such thing as a function of zero arguments.<br>
<div class=""><br>
> It's also sort of, kind of a function<br>
> from RealWorld to (String, RealWorld) if you squint.<br>
<br>
</div>I'm don't think this is a very helpful way to understand IO, though it<br>
is probably closer to the sense in which the OP understood IO String<br>
to be a function.<br>
<br>
My guess is that what is really going on here is a confusion of<br>
terminology from imperative languages, some of which use the word<br>
"function" for everything, whether they take any arguments or not,<br>
return any values or not, have any side effects or not, etc.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Brent<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Wed, Mar 5, 2014 at 10:18 AM, Kim-Ee Yeoh <<a href="mailto:ky3@atamo.com">ky3@atamo.com</a>> wrote:<br>
><br>
> ><br>
> > On Thu, Mar 6, 2014 at 12:49 AM, Nathan Hüsken <<a href="mailto:nathan.huesken@posteo.de">nathan.huesken@posteo.de</a>>wrote:<br>
> ><br>
> >> Mmh, I might not have used haskell terminology correctly. Its a function,<br>
> >> in the sense of a function of an imperative language ...<br>
> ><br>
> ><br>
> > Yes, you could model IO String in C as a function taking void and<br>
> > returning a pointer to char.<br>
> ><br>
> > Calling an IO String a Haskell function would confuse a lot of people.<br>
> ><br>
> > -- Kim-Ee<br>
> ><br>
> > _______________________________________________<br>
> > Beginners mailing list<br>
> > <a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
> > <a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
> ><br>
> ><br>
<br>
> _______________________________________________<br>
> Beginners mailing list<br>
> <a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br></div>