<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Conal Elliott &#187; technique</title>
	<atom:link href="http://conal.net/blog/tag/technique/feed" rel="self" type="application/rss+xml" />
	<link>http://conal.net/blog</link>
	<description>Inspirations &#38; experiments, mainly about denotative/functional programming in Haskell</description>
	<lastBuildDate>Thu, 25 Jul 2019 18:15:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.17</generator>
	<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=conal&amp;popout=1&amp;url=http%3A%2F%2Fconal.net%2Fblog%2F&amp;language=en_US&amp;category=text&amp;title=Conal+Elliott&amp;description=Inspirations+%26amp%3B+experiments%2C+mainly+about+denotative%2Ffunctional+programming+in+Haskell&amp;tags=blog" type="text/html" />
	<item>
		<title>Prettier functions for wrapping and wrapping</title>
		<link>http://conal.net/blog/posts/prettier-functions-for-wrapping-and-wrapping</link>
		<comments>http://conal.net/blog/posts/prettier-functions-for-wrapping-and-wrapping#comments</comments>
		<pubDate>Tue, 02 Dec 2008 06:46:27 +0000</pubDate>
		<dc:creator><![CDATA[Conal]]></dc:creator>
				<category><![CDATA[Functional programming]]></category>
		<category><![CDATA[point-free]]></category>
		<category><![CDATA[technique]]></category>
		<category><![CDATA[type composition]]></category>

		<guid isPermaLink="false">http://conal.net/blog/?p=68</guid>
		<description><![CDATA[The post Semantic editor combinators gave an example of a pattern that comes up a lot for me in Haskell programming. I want to apply functions inside of a newtype without cumbersome unwrapping and wrapping of the representation insides. While chatting with Daniel Peebles in #haskell today, the realization hit me that these &#8220;higher-order wrappers&#8221; [&#8230;]]]></description>
				<content:encoded><![CDATA[<!-- 

Title: Prettier functions for wrapping and wrapping

Tags: technique, type composition, point-free

URL: http://conal.net/blog/posts/prettier-functions-for-wrapping-and-wrapping/

-->

<!-- references -->

<!-- teaser -->

<p>The post <em><a href="http://conal.net/blog/posts/semantic-editor-combinators/" title="blog post">Semantic editor combinators</a></em> gave an example of a pattern that comes up a lot for me in Haskell programming.
I want to apply functions inside of a <code>newtype</code> without cumbersome unwrapping and wrapping of the representation insides.</p>

<p>While chatting with Daniel Peebles in #haskell today, the realization hit me that these &#8220;higher-order wrappers&#8221; can not only make other code pretty, but can themselves be expressed more beautifully and clearly, using two of the combinators given in that post.</p>

<!--
**Edits**:

* 2008-02-09: just fiddling around
-->

<!-- without a comment or something here, the last item above becomes a paragraph -->

<p><span id="more-68"></span></p>

<p>The example I gave was type composition, taken from the <a href="http://haskell.org/haskellwiki/TypeCompose" title="Wiki page">TypeCompose</a> library:</p>

<pre><code>newtype (g :. f) a = O { unO :: g (f a) }
</code></pre>

<p>The convenient higher-order wrappers apply n-ary function within <code>O</code> constructors:</p>

<pre><code>inO  h (O gfa) = O (h gfa)
inO2 h (O gfa) (O gfa') = O (h gfa gfa')
...
</code></pre>

<p>Then I get to implement <code>Functor</code> and <code>Applicative</code> instances in the style of semantic editor combinators.</p>

<pre><code>instance (Functor g, Functor f) =&gt; Functor (g :. f) where
  fmap  = inO . fmap . fmap

instance (Applicative g, Applicative f) =&gt; Applicative (g :. f) where
  pure  = O . pure . pure
  (&lt;*&gt;) = (inO2 . liftA2) (&lt;*&gt;)
</code></pre>

<p>The point-free definitions I gave before are pretty cryptic if you&#8217;re not used to the style:</p>

<pre><code>inO  = (  O  .) . (. unO)
inO2 = (inO  .) . (. unO)
inO3 = (inO2 .) . (. unO)
...
</code></pre>

<p>What dawned on me today is that I can instead say what I mean plainly: <code>inO</code> applies <code>unO</code> to the argument and <code>O</code> to the result.</p>

<pre><code>inO  = result   O  . argument unO
</code></pre>

<p>Similarly, <code>inO2</code> applies <code>unO</code> to the (first) argument and <code>inO</code> to the resulting function.
Similarly for <code>inO3</code>:</p>

<pre><code>inO2 = result inO  . argument unO
inO3 = result inO2 . argument unO
...
</code></pre>

<p>The unwrapping and wrapping don&#8217;t interact, so, we can write equivalent definitions, swapping the compositions:</p>

<pre><code>inO2 = argument unO  . result inO
</code></pre>

<p>Equivalence follows from associativity of function composition.</p>
<p><a href="http://conal.net/blog/?flattrss_redirect&amp;id=68&amp;md5=9c0a30468e629eb7494cdab448736186"><img src="http://conal.net/blog/wp-content/plugins/flattr/img/flattr-badge-white.png" srcset="http://conal.net/blog/wp-content/plugins/flattr/img/flattr-badge-white.png, http://conal.net/blog/wp-content/plugins/flattr/img/flattr-badge-white@2x.png 2xhttp://conal.net/blog/wp-content/plugins/flattr/img/flattr-badge-white.png, http://conal.net/blog/wp-content/plugins/flattr/img/flattr-badge-white@3x.png 3x" alt="Flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://conal.net/blog/posts/prettier-functions-for-wrapping-and-wrapping/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=conal&amp;popout=1&amp;url=http%3A%2F%2Fconal.net%2Fblog%2Fposts%2Fprettier-functions-for-wrapping-and-wrapping&amp;language=en_GB&amp;category=text&amp;title=Prettier+functions+for+wrapping+and+wrapping&amp;description=The+post+Semantic+editor+combinators+gave+an+example+of+a+pattern+that+comes+up+a+lot+for+me+in+Haskell+programming.+I+want+to+apply+functions+inside+of+a+newtype...&amp;tags=point-free%2Ctechnique%2Ctype+composition%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Semantic editor combinators</title>
		<link>http://conal.net/blog/posts/semantic-editor-combinators</link>
		<comments>http://conal.net/blog/posts/semantic-editor-combinators#comments</comments>
		<pubDate>Tue, 25 Nov 2008 06:06:52 +0000</pubDate>
		<dc:creator><![CDATA[Conal]]></dc:creator>
				<category><![CDATA[Functional programming]]></category>
		<category><![CDATA[applicative functor]]></category>
		<category><![CDATA[arrow]]></category>
		<category><![CDATA[combinator]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[technique]]></category>
		<category><![CDATA[type composition]]></category>

		<guid isPermaLink="false">http://conal.net/blog/?p=64</guid>
		<description><![CDATA[While working on Eros, I encountered a function programming pattern I hadn&#8217;t known. I was struck by the simplicity and power of this pattern, and I wondered why I hadn&#8217;t run into it before. I call this idea &#8220;semantic editor combinators&#8221;, because it&#8217;s a composable way to create transformations on rich values. I&#8217;m writing this [&#8230;]]]></description>
				<content:encoded><![CDATA[<!-- 

Title: Semantic editor combinators

Tags: editor, combinator, arrow, applicative functor, technique, type composition

URL: http://conal.net/blog/posts/semantic-editor-combinators/

-->

<!-- references -->

<!-- teaser -->

<p>While working on <a href="http://haskell.org/haskellwiki/Eros" title="Wiki page: Eros -- tangible functional programming">Eros</a>, I encountered a function programming pattern I hadn&#8217;t known.
I was struck by the simplicity and power of this pattern, and I wondered why I hadn&#8217;t run into it before.
I call this idea &#8220;semantic editor combinators&#8221;, because it&#8217;s a composable way to create transformations on rich values.
I&#8217;m writing this post in order to share this simple idea, which is perhaps &#8220;almost obvious&#8221;, but not quite, due to two interfering habits:</p>

<ul>
<li>thinking of function composition as binary instead of unary, and</li>
<li>seeing the functions <code>first</code> and <code>second</code> as about arrows, and therefore esoteric.</li>
</ul>

<p>What I enjoy most about these (semantic) editor combinators is that their use is type-directed and so doesn&#8217;t require much imagination.
When I have the type of a complex value, and I want to edit some piece buried inside, I just read off the path in the containing type, on the way to the buried value.</p>

<p>I started writing this post last year and put it aside.
Recent threads on the <a href="http://www.haskell.org/mailman/listinfo/reactive">Reactive mailing list</a> (including a dandy <a href="http://www.haskell.org/pipermail/reactive/2008-November/000054.html">explanation by Peter Verswyvelen</a>) and on <a href="http://netsuperbrain.com/blog/">David Sankel&#8217;s blog</a> reminded me of my unfinished post, so I picked it up again.</p>

<p><strong>Edits</strong>:</p>

<ul>
<li>2008-11-29: added type of <code>v6</code> example.  Tweaked <code>inO2</code> alignment.</li>
</ul>

<!-- without a comment or something here, the last item above becomes a paragraph -->

<p><span id="more-64"></span></p>

<h3>Example</h3>

<p>Suppose we have a value defined as follows.</p>

<pre><code>v0 :: (Int, Char -&gt; (String,Bool))
v0 = (3,  c -&gt; ([c,'q',c,'r'], isDigit c))
</code></pre>

<p>Now, how can one edit this value?
By &#8220;edit&#8221;, I simply mean to produce a value that resembles <code>v0</code> but has alterations made.</p>

<p>For concreteness, let&#8217;s say I want to reverse the string.
A programmer might answer by firing up vim, Emacs, or <a href="http://www.haskell.org/haskellwiki/Yi">yi (whee!)</a>, and change the definition to</p>

<pre><code>v0 = (3,  c -&gt; (['r',c,'q',c], isDigit c))
</code></pre>

<p>But this answer doesn&#8217;t really fit the question, which was to edit the <em>value</em>.
I want a way to edit the <em>semantics</em>, not the <em>syntax</em>, i.e., the value rather than the expression.</p>

<p>Similarly, I might want to</p>

<ul>
<li>negate the boolean,</li>
<li>double the Int,</li>
<li>swap the inner pair, or</li>
<li>swap the outer pair.</li>
</ul>

<p>Semantic editor combinators makes these tasks easy, using the following recipe, writing from left to right:</p>

<ul>
<li>Read out the path in the type of the value being edited (<code>v0</code> here), from the outside to the part to edit, naming each step, according to <em>part</em> of the type being entered, using the names &#8220;first&#8221; and &#8220;second&#8221; for pairs, and &#8220;result&#8221; for functions.</li>
<li>Write down that path as its part names, separated by periods.  If the path has at least two components, surrounded by parentheses.</li>
<li>Next write the alteration function to be applied.</li>
<li>Finally, the value being edited.</li>
</ul>

<p>In our string-reversal example, these steps look like</p>

<ul>
<li><code>(second.result.first)</code> &#8212; <em>second of the pair, result of that function, and first of that pair</em></li>
<li><code>reverse</code></li>
<li><code>v0</code></li>
</ul>

<p>So the value editing is accomplished by</p>

<pre><code>v1 = (second.result.first) reverse v0
</code></pre>

<p>Let&#8217;s see if the editing worked.
First, inspect <code>v0</code>, using GHCi:</p>

<pre><code>&gt; fst v0
3
&gt; (snd v0) 'z'
("zqzr",False)
</code></pre>

<p>and then <code>v1</code>:</p>

<pre><code>&gt; :ty v1
v1 :: (Int, Char -&gt; (String, Bool))
&gt; fst v1
3
&gt; (snd v1) 'z'
("rzqz",False)
</code></pre>

<p>The other four editings listed above are just as easy</p>

<pre><code>double x   = x+x
swap (x,y) = (y,x)

-- negate the boolean,
v2 = (second.result.second) not v0

-- double the Int,
v3 = first double v0

-- swap the inner pair, or
v4 = (second.result) swap v0

-- swap the outer pair
v5 = swap v0
</code></pre>

<p>Testing in GHCi:</p>

<pre><code>&gt; :ty v2
v2 :: (Int, Char -&gt; (String, Bool))
&gt; fst v2
3
&gt; (snd v2) 'z'
("zqzr",True)

&gt; :ty v3
v3 :: (Int, Char -&gt; (String, Bool))
&gt; fst v3
6
&gt; (snd v3) 'z'
("zqzr",False)

&gt; :ty v4
v4 :: (Int, Char -&gt; (Bool, String))
&gt; fst v4
3
&gt; (snd v4) 'z'
(False,"zqzr")

&gt; :ty v5
v5 :: (Char -&gt; (String, Bool), Int)
&gt; fst v5
&lt;interactive&gt;:1:0: No instance for (Show (Char -&gt; (String, Bool))) ...
&gt; snd v5
3
&gt; fst v5 'z'
("zqzr",False)
</code></pre>

<p>Since <code>String</code> is a synonym for <code>[Char]</code>, the type of <code>v0</code> has even more structure we can delve into:</p>

<pre><code>v0 :: (Int, Char -&gt; ([Char],Bool))
</code></pre>

<p>Add a fourth path component, <code>element</code>, for entering elements of lists.
Now we can edit the characters:</p>

<pre><code>-- previous character
v6 = (second.result.first.element) pred v0

-- character value
v7 = (second.result.first.element) ord v0
</code></pre>

<p>Testing:</p>

<pre><code>&gt; :ty v6
v6 :: (Int, Char -&gt; ([Char], Bool))
&gt; fst v6
3
&gt; (snd v6) 'z'
("ypyq",False)

&gt; :ty v7
v7 :: (Int, Char -&gt; ([Int], Bool))
&gt; fst v7
3
&gt; (snd v7) 'z'
([122,113,122,114],False)
</code></pre>

<h3>What&#8217;s going on here?</h3>

<p>You may be familiar with the functions <code>first</code> and <code>second</code>.  They&#8217;re methods on the <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Arrow.html"><code>Arrow</code> class</a>, so they&#8217;re pretty general.
When operating on <em>functions</em>, they have the following types and definitions:</p>

<pre><code>first  :: (a -&gt; a') -&gt; ((a,b) -&gt; (a',b))
second :: (b -&gt; b') -&gt; ((a,b) -&gt; (a,b'))

first  f =  (a,b) -&gt; (f a, b)
second g =  (a,b) -&gt; (a, g b)
</code></pre>

<p>Note that, as needed, <code>first</code> and <code>second</code> apply given functions to part of a pair value, carrying along the other half of the pair.</p>

<p>When working syntactically, we often apply functions under lambdas.
The corresponding value-level, embedding combinator is just function composition.
I&#8217;ll use the name <code>result</code> as a synonym for <code>(.)</code>, for consistency with <code>first</code> and <code>second</code> and, more importantly, for later generalization.</p>

<pre><code>result :: (b -&gt; b') -&gt; ((a -&gt; b) -&gt; (a -&gt; b'))
result =  (.)
</code></pre>

<p>As with <code>first</code> and <code>second</code>, I&#8217;ve used parentheses in the type signatures to emphasize the path components as being <em>unary</em>, not binary.
It&#8217;s this unusual unary view that makes <code>first</code>, <code>second</code>, and <code>result</code> (or <code>(.)</code>) composable and guides us toward composable generalizations.</p>

<p>Similarly, the <code>element</code> component is synonym for <code>fmap</code>:</p>

<pre><code>element :: (a -&gt; b) -&gt; ([a] -&gt; [b])
element = fmap
</code></pre>

<p>However, using <code>fmap</code> directly is very useful, since it encompasses <em>all</em> <code>Functor</code> types.
Since functions from any given type is a functor, I often use <code>fmap</code> in place of <code>result</code>, just to avoid having to define result.
Thanks to the <code>Functor</code> instance of pairing, we can also use <code>fmap</code> in place <code>second</code>.
(The two, however, are <a href="http://netsuperbrain.com/blog/posts/analysis-of-lazy-stream-programs/">not quite the same</a>.)
An advantage of names like <code>result</code>, <code>element</code> and <code>second</code> is that they&#8217;re more specifically descriptive.
Hence they are easier for people to read, and they lead to more helpful error messages.</p>

<h3>Found in the wild</h3>

<p>The examples above are toys I contrived to give you the basic idea.
Now I&#8217;d like to show you how very useful this technique can be in practice.</p>

<p><a href="http://haskell.org/haskellwiki/Reactive" title="Wiki page">Reactive</a> represents events via two types, <code>Future</code> and <code>Reactive</code>:</p>

<pre><code>newtype EventG t a = Event (FutureG t (ReactiveG t a))
</code></pre>

<p>The <code>Functor</code> instance uses the functor instances of <code>FutureG</code> and <code>ReactiveG</code>:</p>

<pre><code>instance Functor (EventG t) where fmap = inEvent.fmap.fmap
</code></pre>

<p>The <code>inEvent</code> functional is also a semantic editor combinator, though not so obvious from the types.
It applies a given function inside the representation of an event.</p>

<p>One pattern I use quite a lot is applying a function to the result of a curried-style multi-argument function.
For instance, <a href="http://haskell.org/haskellwiki/Reactive" title="Wiki page">Reactive</a> has a <a href="http://hackage.haskell.org/packages/archive/reactive/latest/doc/html/FRP-Reactive-Reactive.html#v%3AcountE"><code>countE</code></a> function to count event occurrences.
Each occurrence value get paired with the number of occurrences so far.</p>

<pre><code>countE :: Num n =&gt; Event b -&gt; Event (b,n)
countE = stateE 0 (+1)
</code></pre>

<p>Quite often, I use a forgetful form, <a href="(http://hackage.haskell.org/packages/archive/reactive/latest/doc/html/FRP-Reactive-Reactive.html#v%3AcountE_)"><code>countE_</code></a>, which discards the original values.
Looking at the type of <code>countE</code>, I know to direct <code>snd</code> into the <code>result</code> and then into the values of the event.
The definition follows robomatically from the type.</p>

<pre><code>countE_ :: Num n =&gt; Event b -&gt; Event n
countE_ = (result.fmap) snd countE
</code></pre>

<p>You can play this game with any number of arguments.
For instance, Reactive has <a href="http://hackage.haskell.org/packages/archive/reactive/latest/doc/html/FRP-Reactive-Behavior.html#v%3Asnapshot">a function for snaphotting behaviors on each occurrence of an event</a>, taking an initial state, state transition function, and an input event.</p>

<pre><code>snapshot :: Event a -&gt; Reactive b -&gt; Event (a,b)
</code></pre>

<p>The forgetful version descends into two results and one event, to edit the pair found there:</p>

<pre><code>snapshot_ :: Event a -&gt; Reactive b -&gt; Event b
snapshot_ = (result.result.fmap) snd snapshot
</code></pre>

<p>I could have written the following pointful version instead:</p>

<pre><code>snapshot_ e b = fmap snd (snapshot e b)
</code></pre>

<p>As a more varied example, consider these two functions:</p>

<pre><code>withRestE :: Event a -&gt; Event (a, Event a)

firstE :: Event a -&gt; a
</code></pre>

<p>The function <a href="http://hackage.haskell.org/packages/archive/reactive/latest/doc/html/FRP-Reactive-Reactive.html#v%3AwithNextE"><code>withNextE</code></a> directs <code>firstE</code> into the inner event of <code>withRestE</code>.</p>

<pre><code>withNextE :: Event a -&gt; Event (a,a)
withNextE = (result.fmap.second) firstE withRestE
</code></pre>

<h3>Who&#8217;s missing?</h3>

<p>We have <code>first</code> <code>second</code> to edit the first and second part of a pair.
We also have <code>result</code> to edit result part of a function.
We can also edit the <code>argument</code> part:</p>

<pre><code>argument :: (a' -&gt; a) -&gt; ((a -&gt; b) -&gt; (a' -&gt; b))
</code></pre>

<p>This editor combinator has a different flavor from the others, in that it is <em>contravariant</em>.
(Note the primes.)
Its definition is simple:</p>

<pre><code>argument = flip (.)
</code></pre>

<h3>Higher arity</h3>

<p>The combinators above direct unary functions into single structures.
A similar game works for n-ary functions, using the applicative functor lifters.
For instance,</p>

<pre><code>liftA2 :: (Applicative f) =&gt;
          (a -&gt; b -&gt; c) -&gt; (f a -&gt; f b -&gt; f c)
</code></pre>

<p>Since <code>liftA2</code> promotes <em>arbitrary</em> binary functions to binary functions, it can be       applied again &amp; again.</p>

<pre><code>*Main Control.Applicative&gt; :ty liftA2.liftA2.liftA2
liftA2.liftA2.liftA2 ::
  (Applicative f, Applicative g , Applicative h) =&gt;
  (a -&gt; b -&gt; c) -&gt; f (g (h a)) -&gt; f (g (h b)) -&gt; f (g (h c))
</code></pre>

<p>Similarly for <code>liftA3</code> etc.</p>

<p>Now an in-the-wild higher-arity example, taken from the <a href="http://haskell.org/haskellwiki/TypeCompose" title="Wiki page">TypeCompose</a> library.</p>

<p>Here&#8217;s a very handy way to compose two type constructors:</p>

<pre><code>newtype (g :. f) a = O { unO :: g (f a) }
</code></pre>

<p>We can apply n-ary function within <code>O</code> constructors:</p>

<pre><code>inO :: (g (f a) -&gt; g' (f' a')) -&gt; ((g :. f) a -&gt; (g' :. f') a')
inO h (O gfa) = O (h gfa)

inO2 :: ( g (f a)   -&gt;  g' (f' a')   -&gt;  g'' (f'' a''))
     -&gt; ((g :. f) a -&gt; (g' :. f') a' -&gt; (g'' :. f'') a'')
inO2 h (O gfa) (O gfa') = O (h gfa gfa')

...
</code></pre>

<p>Less pointedly,</p>

<pre><code>inO  = (  O  .) . (. unO)
inO2 = (inO  .) . (. unO)
inO3 = (inO2 .) . (. unO)
...
</code></pre>

<p>Functors compose into functors, and applicatives compose into applicatives.
(See <em><a href="http://www.soi.city.ac.uk/~ross/papers/Applicative.html" title="paper by Conor McBride and Ross Paterson">Applicative Programming with Effects</a></em>.)
The semantic-editor-combinator programming style makes these for very simple instance definitions:</p>

<pre><code>instance (Functor g, Functor f) =&gt; Functor (g :. f) where
  fmap  = inO.fmap.fmap

instance (Applicative g, Applicative f) =&gt; Applicative (g :. f) where
  pure  = O . pure . pure
  (&lt;*&gt;) = (inO2.liftA2) (&lt;*&gt;)
</code></pre>

<h3>What&#8217;s ahead?</h3>

<p>Two of our semantic editor combinators (path components) have more general types than we&#8217;ve used so far:</p>

<pre><code>first  :: Arrow (~&gt;) =&gt; (a ~&gt; a') -&gt; ((a,b) ~&gt; (a',b))
second :: Arrow (~&gt;) =&gt; (b ~&gt; b') -&gt; ((a,b) ~&gt; (a,b'))
</code></pre>

<p>I&#8217;ve simply replaced some of the <code>(-&gt;)</code>&#8216;s in the function-specific types with an arbitrary arrow type <code>(~&gt;)</code>.</p>

<p>Another post will similarly generalize <code>result</code> and then will give some nifty uses of this generalization for applying combinator-based semantic editing beyond simple values to</p>

<ul>
<li>Type representations</li>
<li>Code</li>
<li>Graphical user interfaces</li>
<li>Combinations of all of the above (including values)</li>
</ul>
<p><a href="http://conal.net/blog/?flattrss_redirect&amp;id=64&amp;md5=ade9ae9f5430ab6618064641dafbc6d4"><img src="http://conal.net/blog/wp-content/plugins/flattr/img/flattr-badge-white.png" srcset="http://conal.net/blog/wp-content/plugins/flattr/img/flattr-badge-white.png, http://conal.net/blog/wp-content/plugins/flattr/img/flattr-badge-white@2x.png 2xhttp://conal.net/blog/wp-content/plugins/flattr/img/flattr-badge-white.png, http://conal.net/blog/wp-content/plugins/flattr/img/flattr-badge-white@3x.png 3x" alt="Flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://conal.net/blog/posts/semantic-editor-combinators/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=conal&amp;popout=1&amp;url=http%3A%2F%2Fconal.net%2Fblog%2Fposts%2Fsemantic-editor-combinators&amp;language=en_GB&amp;category=text&amp;title=Semantic+editor+combinators&amp;description=While+working+on+Eros%2C+I+encountered+a+function+programming+pattern+I+hadn%26%238217%3Bt+known.+I+was+struck+by+the+simplicity+and+power+of+this+pattern%2C+and+I+wondered+why+I+hadn%26%238217%3Bt...&amp;tags=applicative+functor%2Carrow%2Ccombinator%2Ceditor%2Ctechnique%2Ctype+composition%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>
