From 570ec471d1605318aeefb030cd78682ae442235b Mon Sep 17 00:00:00 2001
From: EuAndreh <eu@euandre.org>
Date: Mon, 31 Mar 2025 21:51:40 -0300
Subject: src/content/: Update all files left to asciidoc

---
 .../2021/09/03/sicp-persistent-queue.adoc          | 37 ++++++++--------------
 1 file changed, 14 insertions(+), 23 deletions(-)

(limited to 'src/content/pastebins/2021/09/03/sicp-persistent-queue.adoc')

diff --git a/src/content/pastebins/2021/09/03/sicp-persistent-queue.adoc b/src/content/pastebins/2021/09/03/sicp-persistent-queue.adoc
index 8cf7ea2..2b4a8a2 100644
--- a/src/content/pastebins/2021/09/03/sicp-persistent-queue.adoc
+++ b/src/content/pastebins/2021/09/03/sicp-persistent-queue.adoc
@@ -1,36 +1,25 @@
----
+= SICP persistent amortized O(1) queue
 
-title: SICP persistent amortized O(1) queue
-
-date: 2021-09-03
-
-layout: post
-
-lang: en
-
-ref: sicp-persistent-amortized-o1-queue
-
----
-
-```scheme
+[source,scheme]
+----
 (define (queue)
   (cons '()
-	'()))
+    '()))
 
 (define (enqueue x q)
   (cons (car q)
-	(cons x (cdr q))))
+        (cons x (cdr q))))
 
 (define (flush q)
   (cons (reverse (cdr q))
-	'()))
+        '()))
 
 (define (dequeue q)
   (if (null? (car q))
     (dequeue (flush q))
     (cons (caar q)
-	  (cons (cdar q)
-		(cdr q)))))
+      (cons (cdar q)
+            (cdr q)))))
 
 (define (empty? q)
   (and (null? (car q))
@@ -43,7 +32,7 @@ ref: sicp-persistent-amortized-o1-queue
   (define (rec l leading-space?)
     (when (not (null? l))
       (when leading-space?
-	(display " "))
+      (display " "))
       (display (car l))
       (rec (cdr l) #t)))
 
@@ -52,10 +41,12 @@ ref: sicp-persistent-amortized-o1-queue
   (rec (reverse (cdr q)) (not (null? (car q))))
   (display ")")
   (newline))
-```
+----
 
 Sample interactive session:
-```scheme
+
+[source,scheme]
+----
 scheme@(guile-user)> (define true #t)
 scheme@(guile-user)> (define false #f)
 scheme@(guile-user)> (define q (queue))
@@ -82,4 +73,4 @@ scheme@(guile-user)> (print-queue q)
 #q(b c d e)
 scheme@(guile-user)> (print-queue (cdr (dequeue (cdr (dequeue (enqueue 'g (enqueue 'f q)))))))
 #q(d e f g)
-```
+----
-- 
cgit v1.2.3

