aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-12-20 22:08:31 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-12-20 22:08:31 +0100
commitb2fc6c04a77139d3936eec72a8312b455ecf182e (patch)
tree9ddd931c1e680ccbed21f83bb773bc8b86e9b7fa
parentRemove procedure map-each (diff)
downloadcalp-b2fc6c04a77139d3936eec72a8312b455ecf182e.tar.gz
calp-b2fc6c04a77139d3936eec72a8312b455ecf182e.tar.xz
Documentation updates for util.
-rw-r--r--doc/ref/guile.texi2
-rw-r--r--module/calp/util.scm7
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/ref/guile.texi b/doc/ref/guile.texi
index 8468021e..b21850bd 100644
--- a/doc/ref/guile.texi
+++ b/doc/ref/guile.texi
@@ -1,6 +1,8 @@
@node Guile
@chapter Guile
+@include guile/util.texi
+
@c TODO
This chapter will probably in the future be replaced by a proper
system overview in the future.
diff --git a/module/calp/util.scm b/module/calp/util.scm
index 044e4a95..96ca2f01 100644
--- a/module/calp/util.scm
+++ b/module/calp/util.scm
@@ -362,7 +362,7 @@
;; NOTE changing this list to cons allows the output to work with assq-merge.
(hash-map->list list h)))
-;; (group-by '(0 1 2 3 4 2 5 6) 2)
+;; (split-by '(0 1 2 3 4 2 5 6) 2)
;; ⇒ ((0 1) (3 4) (5 6))
(define-public (split-by list item)
(let loop ((done '())
@@ -533,6 +533,10 @@
(define-public (->quoted-string any)
(with-output-to-string (lambda () (write any))))
+
+
+
+;; TODO shouldn't this use `file-name-separator-string'?
(define-public (path-append . strings)
(fold (lambda (s done)
(string-append
@@ -551,6 +555,7 @@
+;;; TODO shouldn't this use dynamic-wind? To handle non-local exits?
(define-syntax let-env
(syntax-rules ()
[(_ ((name value) ...)