<?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>Yet Another [À Compléter] &#187; bubble sort</title>
	<atom:link href="http://blog.neteril.org/tag/bubble-sort/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.neteril.org</link>
	<description>Random thoughts of Jérémie Laval</description>
	<lastBuildDate>Wed, 24 Aug 2011 17:43:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Just some parentheses madness</title>
		<link>http://blog.neteril.org/2008/04/13/just-some-parentheses-madness/</link>
		<comments>http://blog.neteril.org/2008/04/13/just-some-parentheses-madness/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 19:43:29 +0000</pubDate>
		<dc:creator>Jérémie Laval</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bubble sort]]></category>
		<category><![CDATA[scheme]]></category>

		<guid isPermaLink="false">http://garuma.wordpress.com/?p=171</guid>
		<description><![CDATA[(define tri-bulle (lambda (t) (tb '() t #f))) (define tb (lambda (left right perm) (if (null? (cdr right)) (if perm (tb '() (append left right) #f) (append left right)) (let ((first (car right)) (second (cadr right)) (tail (cddr right))) (if (&#60;= first second) (tb (append left (list first)) (cons second tail) perm) (tb (append left [...]]]></description>
			<content:encoded><![CDATA[<pre>(define tri-bulle (lambda (t) (tb '() t #f)))
(define tb
   (lambda (left right perm)
      (if (null? (cdr right))
	  (if perm
	      (tb '() (append left right) #f)
	      (append left right))
	  (let ((first (car right))
		(second (cadr right))
		(tail (cddr right)))
	     (if (&lt;= first second)
		 (tb (append left (list first)) (cons second tail) perm)
		 (tb (append left (list second)) (cons first tail) #t))))))</pre>
<p>Just a recursive (pseudo-recursive?) implementation of a bubble sort in Scheme. I was supposed to do that thing in C but I found it more challenging this way. A good occasion to re-discover standard operations on list and how to use bee (Bigloo&#8217;s IDE) with emacs.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2008/04/13/just-some-parentheses-madness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

