<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Interesting higher-order functionals</title>
	<link>http://math.andrej.com/2006/03/21/interesting-higher-order-functionals/</link>
	<description>Mathematics for computers</description>
	<pubDate>Wed, 20 Aug 2008 12:09:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Andrej Bauer</title>
		<link>http://math.andrej.com/2006/03/21/interesting-higher-order-functionals/#comment-857</link>
		<dc:creator>Andrej Bauer</dc:creator>
		<pubDate>Sat, 03 Feb 2007 22:13:39 +0000</pubDate>
		<guid>http://math.andrej.com/2006/03/21/interesting-higher-order-functionals/#comment-857</guid>
		<description>I would count "adding up" Pierce's Law and continuations to order 5 as cheating. It's not telling us anything more than just the sum of the two concepts we put together.</description>
		<content:encoded><![CDATA[<p>I would count &#8220;adding up&#8221; Pierce&#8217;s Law and continuations to order 5 as cheating. It&#8217;s not telling us anything more than just the sum of the two concepts we put together.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cgibbard</title>
		<link>http://math.andrej.com/2006/03/21/interesting-higher-order-functionals/#comment-850</link>
		<dc:creator>cgibbard</dc:creator>
		<pubDate>Sat, 03 Feb 2007 20:13:18 +0000</pubDate>
		<guid>http://math.andrej.com/2006/03/21/interesting-higher-order-functionals/#comment-850</guid>
		<description>I was just playing around with a function of order 5, and saw this blog post, so I thought I'd comment.

Call-with-current-continuation in a language with first class continuations (making the type system correspond to classical logic) has type `((p -&gt; q) -&gt; p) -&gt; p`, and so is order 3. However, without first class continuations, this type becomes uninhabited.

The natural analogue of call/cc when you don't have first class continuations has type:
`((((p -&gt; k) -&gt; k) -&gt; ((q -&gt; k) -&gt; k)) -&gt; ((p -&gt; k) -&gt; k)) -&gt; ((p -&gt; k) -&gt; k)`
making it order 5. The translation from classical to intuitionist logic increases the order by 2. I think it's reasonable enough to conclude that it's important, given that one form of it is distributed with most Haskell implementations as Control.Monad.Cont.callCC, in the instance of MonadCont for the type Cont k. Whether this qualifies as something having an analogue at a lower order is an interesting question. In order to lower the order of the function to make it more comprehensible, the libraries introduce the type constructor Cont, such that Cont k a is isomorphic to `((a -&gt; k) -&gt; k)`, which brings the order back down to 3. (Cont k) is then made a monad instance, and callCC is implemented for it in the instance of MonadCont. The implementation needs to actually use the structure of the type of course, making it 5th order, at least in terms of how you have to look at it during implementation.</description>
		<content:encoded><![CDATA[<p>I was just playing around with a function of order 5, and saw this blog post, so I thought I&#8217;d comment.</p>
<p>Call-with-current-continuation in a language with first class continuations (making the type system correspond to classical logic) has type `((p -> q) -> p) -> p`, and so is order 3. However, without first class continuations, this type becomes uninhabited.</p>
<p>The natural analogue of call/cc when you don&#8217;t have first class continuations has type:<br />
`((((p -> k) -> k) -> ((q -> k) -> k)) -> ((p -> k) -> k)) -> ((p -> k) -> k)`<br />
making it order 5. The translation from classical to intuitionist logic increases the order by 2. I think it&#8217;s reasonable enough to conclude that it&#8217;s important, given that one form of it is distributed with most Haskell implementations as Control.Monad.Cont.callCC, in the instance of MonadCont for the type Cont k. Whether this qualifies as something having an analogue at a lower order is an interesting question. In order to lower the order of the function to make it more comprehensible, the libraries introduce the type constructor Cont, such that Cont k a is isomorphic to `((a -> k) -> k)`, which brings the order back down to 3. (Cont k) is then made a monad instance, and callCC is implemented for it in the instance of MonadCont. The implementation needs to actually use the structure of the type of course, making it 5th order, at least in terms of how you have to look at it during implementation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: greg buchholz</title>
		<link>http://math.andrej.com/2006/03/21/interesting-higher-order-functionals/#comment-65</link>
		<dc:creator>greg buchholz</dc:creator>
		<pubDate>Tue, 09 May 2006 20:58:23 +0000</pubDate>
		<guid>http://math.andrej.com/2006/03/21/interesting-higher-order-functionals/#comment-65</guid>
		<description>Speaking of Haskell and higher order functions, we might as well mention Chris Okasaki's

Even Higher-Order Functions for Parsing or Why Would Anyone Ever Want To Use a Sixth-Order Function?

http://citeseer.ist.psu.edu/okasaki99functional.html</description>
		<content:encoded><![CDATA[<p>Speaking of Haskell and higher order functions, we might as well mention Chris Okasaki&#8217;s</p>
<p>Even Higher-Order Functions for Parsing or Why Would Anyone Ever Want To Use a Sixth-Order Function?</p>
<p><a href="http://citeseer.ist.psu.edu/okasaki99functional.html" rel="nofollow">http://citeseer.ist.psu.edu/okasaki99functional.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
