&gt; <a href="http://cvs.haskell.org/cgi-bin" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://cvs.haskell.org/cgi-bin</a><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
/cvsweb.cgi/fptools/libraries/GLUT/examples/RedBook/
</blockquote><br>Ok, I&#39;ll take a look<br><br>&gt; What makes a callback different from any other kind of function?<br><br>Well... what about inside monads?&nbsp; Does this break purity???&nbsp; Does this require adding IO to the monad if the callback function does IO?
<br>
<br>As I&#39;m writing this I kindof have this sense inside me that this is a really newbie-ish question.&nbsp; That the answer is no it doesnt break purity, yes it does require adding IO to the monad, but I&#39;m asking anyway just to check :-)
<br><br><div><span class="gmail_quote">On 7/3/07, <b class="gmail_sendername">Dan Piponi</b> &lt;<a href="mailto:dpiponi@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">dpiponi@gmail.com</a>
&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 7/2/07, Hugh Perkins &lt;<a href="mailto:hughperkins@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">hughperkins@gmail.com</a>&gt; wrote:<br><br>&gt; Anyway, so the question is: how do we write callback functions in
<br>&gt; FP/Haskell?&nbsp;&nbsp;Can someone provide a simple, but functional example?
<br><br>What makes a callback different from any other kind of function? In<br>Haskell, as in other functional programming languages, you&#39;re<br>completely free to pass functions into other functions and store them<br>

in datastructures. Take a look at the &#39;callbacks&#39; used in the HOpenGL<br>examples. They&#39;re just ordinary functions:<br><a href="http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/GLUT/examples/RedBook/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/GLUT/examples/RedBook/</a><br>--<br>Dan<br>_______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.haskell.org/mailman/listinfo/haskell-cafe</a>
<br></blockquote></div><br>