summaryrefslogtreecommitdiff
path: root/src/content/pastebins/2021/09/02
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-03-31 21:51:40 -0300
committerEuAndreh <eu@euandre.org>2025-03-31 21:51:40 -0300
commit570ec471d1605318aeefb030cd78682ae442235b (patch)
tree51e17eabe37c6689f8799b55e6875c3480329a2c /src/content/pastebins/2021/09/02
parentMakefile, mkdeps.sh: Derive index.html and feed.xml from more static "sortdat... (diff)
downloadeuandre.org-570ec471d1605318aeefb030cd78682ae442235b.tar.gz
euandre.org-570ec471d1605318aeefb030cd78682ae442235b.tar.xz
src/content/: Update all files left to asciidoc
Diffstat (limited to 'src/content/pastebins/2021/09/02')
-rw-r--r--src/content/pastebins/2021/09/02/sicp-3-19.adoc24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/content/pastebins/2021/09/02/sicp-3-19.adoc b/src/content/pastebins/2021/09/02/sicp-3-19.adoc
index 75ee346..f6aa8cf 100644
--- a/src/content/pastebins/2021/09/02/sicp-3-19.adoc
+++ b/src/content/pastebins/2021/09/02/sicp-3-19.adoc
@@ -1,18 +1,7 @@
----
+= SICP exercise 3.19
-title: SICP exercise 3.19
-
-date: 2021-09-02
-
-layout: post
-
-lang: en
-
-ref: sicp-exercise-3-19
-
----
-
-```scheme
+[source,scheme]
+----
(define (cycle? l)
(define (rec l x)
(cond
@@ -20,11 +9,12 @@ ref: sicp-exercise-3-19
((eq? l x) true)
(true (rec l (cdr x)))))
(rec l (cdr l)))
-```
+----
Sample interactive session:
-```scheme
+[source,scheme]
+----
scheme@(guile-user)> (define true #t)
scheme@(guile-user)> (define false #f)
scheme@(guile-user)>
@@ -39,4 +29,4 @@ scheme@(guile-user)> (cycle? '(1 2 3))
$9 = #f
scheme@(guile-user)> (cycle? (make-cycle '(1 2 3)))
$10 = #t
-```
+----