<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://mw.hh.se/wg211/index.php?action=history&amp;feed=atom&amp;title=WG211%2FM22Gibbons</id>
	<title>WG211/M22Gibbons - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://mw.hh.se/wg211/index.php?action=history&amp;feed=atom&amp;title=WG211%2FM22Gibbons"/>
	<link rel="alternate" type="text/html" href="http://mw.hh.se/wg211/index.php?title=WG211/M22Gibbons&amp;action=history"/>
	<updated>2026-04-05T21:08:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>http://mw.hh.se/wg211/index.php?title=WG211/M22Gibbons&amp;diff=2491&amp;oldid=prev</id>
		<title>Jeremy-g: /* Breadth-First Traversal Via Staging */</title>
		<link rel="alternate" type="text/html" href="http://mw.hh.se/wg211/index.php?title=WG211/M22Gibbons&amp;diff=2491&amp;oldid=prev"/>
		<updated>2023-04-08T16:22:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Breadth-First Traversal Via Staging&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:22, 8 April 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;An effectful traversal of a data structure iterates over every element, in some predetermined order, collecting computational effects in the process. Depth-first effectful traversal of a tree is straightforward to define compositionally, since it precisely follows the shape of the data. What about breadth-first effectful traversal? An indirect route is to factorize the data structure into shape and contents, traverse the contents, then rebuild the data structure with new contents. We show that this can instead be done directly using staging, expressed using a construction related to free applicative functors. The staged traversals lend themselves well to fusion; we prove a novel fusion rule for effectful traversals, and use it in another solution to Bird&amp;#039;s &amp;quot;repmin&amp;quot; problem.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;An effectful traversal of a data structure iterates over every element, in some predetermined order, collecting computational effects in the process. Depth-first effectful traversal of a tree is straightforward to define compositionally, since it precisely follows the shape of the data. What about breadth-first effectful traversal? An indirect route is to factorize the data structure into shape and contents, traverse the contents, then rebuild the data structure with new contents. We show that this can instead be done directly using staging, expressed using a construction related to free applicative functors. The staged traversals lend themselves well to fusion; we prove a novel fusion rule for effectful traversals, and use it in another solution to Bird&amp;#039;s &amp;quot;repmin&amp;quot; problem.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Slides &lt;/del&gt;and [https://www.cs.ox.ac.uk/publications/publication14875-abstract.html paper].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[File:M22-Gibbons.pdf]] &lt;/ins&gt;and [https://www.cs.ox.ac.uk/publications/publication14875-abstract.html paper].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jeremy-g</name></author>
	</entry>
	<entry>
		<id>http://mw.hh.se/wg211/index.php?title=WG211/M22Gibbons&amp;diff=2490&amp;oldid=prev</id>
		<title>Jeremy-g: Created page with &quot; == Breadth-First Traversal Via Staging ==  Jeremy Gibbons (joint work with Oisin Kidney, Tom Schrijvers, Nick Wu)  An effectful traversal of a data structure iterates over ev...&quot;</title>
		<link rel="alternate" type="text/html" href="http://mw.hh.se/wg211/index.php?title=WG211/M22Gibbons&amp;diff=2490&amp;oldid=prev"/>
		<updated>2023-04-08T16:19:46Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; == Breadth-First Traversal Via Staging ==  Jeremy Gibbons (joint work with Oisin Kidney, Tom Schrijvers, Nick Wu)  An effectful traversal of a data structure iterates over ev...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== Breadth-First Traversal Via Staging ==&lt;br /&gt;
&lt;br /&gt;
Jeremy Gibbons (joint work with Oisin Kidney, Tom Schrijvers, Nick Wu)&lt;br /&gt;
&lt;br /&gt;
An effectful traversal of a data structure iterates over every element, in some predetermined order, collecting computational effects in the process. Depth-first effectful traversal of a tree is straightforward to define compositionally, since it precisely follows the shape of the data. What about breadth-first effectful traversal? An indirect route is to factorize the data structure into shape and contents, traverse the contents, then rebuild the data structure with new contents. We show that this can instead be done directly using staging, expressed using a construction related to free applicative functors. The staged traversals lend themselves well to fusion; we prove a novel fusion rule for effectful traversals, and use it in another solution to Bird&amp;#039;s &amp;quot;repmin&amp;quot; problem.&lt;br /&gt;
&lt;br /&gt;
Slides and [https://www.cs.ox.ac.uk/publications/publication14875-abstract.html paper].&lt;/div&gt;</summary>
		<author><name>Jeremy-g</name></author>
	</entry>
</feed>