aboutsummaryrefslogtreecommitdiff
path: root/module/hnh
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-23 04:14:46 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-06-23 04:14:46 +0200
commit2fb88465f7a25b1eac0cdbb78a05de9e78e68bfd (patch)
treec48c312e1d44306039fc00cfe4b5cd611d7f9a3b /module/hnh
parentRemove procedure tabset. (diff)
downloadcalp-2fb88465f7a25b1eac0cdbb78a05de9e78e68bfd.tar.gz
calp-2fb88465f7a25b1eac0cdbb78a05de9e78e68bfd.tar.xz
Normalize keyword syntax.
Diffstat (limited to 'module/hnh')
-rw-r--r--module/hnh/util.scm136
-rw-r--r--module/hnh/util/exceptions.scm10
-rw-r--r--module/hnh/util/tree.scm16
3 files changed, 81 insertions, 81 deletions
diff --git a/module/hnh/util.scm b/module/hnh/util.scm
index 1e79781f..b0e6b81a 100644
--- a/module/hnh/util.scm
+++ b/module/hnh/util.scm
@@ -1,69 +1,69 @@
(define-module (hnh util)
- #:use-module (srfi srfi-1)
- #:use-module (srfi srfi-71)
- #:use-module (srfi srfi-88) ; postfix keywords
- #:use-module ((sxml fold) #:select (fold-values))
- #:use-module ((srfi srfi-9 gnu) #:select (set-fields))
- #:re-export (fold-values)
- #:export (aif
- awhen
- for
- begin1
- print-and-return
- swap
- case*
- set/r!
- label
- sort* sort*!
- find-extreme find-min find-max
- filter-sorted
- !=
- take-to
- string-take-to
- string-first
- string-last
- as-symb
- enumerate
- unval
- flatten
- let-lazy
- map/dotted
-
- assq-merge
- kvlist->assq
- assq-limit
-
- group-by
- split-by
-
- span-upto
- cross-product
-
- string-flatten
- intersperse
- insert-ordered
-
- -> ->>
- set set->
- and=>>
-
- downcase-symbol
- group
- iterate
- valued-map
-
- assoc-ref-all
- assq-ref-all
- assv-ref-all
-
- vector-last
-
- ->str ->string ->quoted-string
-
- catch*
- )
- #:replace (set! define-syntax
- when unless))
+ :use-module (srfi srfi-1)
+ :use-module (srfi srfi-71)
+ :use-module (srfi srfi-88) ; postfix keywords
+ :use-module ((sxml fold) :select (fold-values))
+ :use-module ((srfi srfi-9 gnu) :select (set-fields))
+ :re-export (fold-values)
+ :export (aif
+ awhen
+ for
+ begin1
+ print-and-return
+ swap
+ case*
+ set/r!
+ label
+ sort* sort*!
+ find-extreme find-min find-max
+ filter-sorted
+ !=
+ take-to
+ string-take-to
+ string-first
+ string-last
+ as-symb
+ enumerate
+ unval
+ flatten
+ let-lazy
+ map/dotted
+
+ assq-merge
+ kvlist->assq
+ assq-limit
+
+ group-by
+ split-by
+
+ span-upto
+ cross-product
+
+ string-flatten
+ intersperse
+ insert-ordered
+
+ -> ->>
+ set set->
+ and=>>
+
+ downcase-symbol
+ group
+ iterate
+ valued-map
+
+ assoc-ref-all
+ assq-ref-all
+ assv-ref-all
+
+ vector-last
+
+ ->str ->string ->quoted-string
+
+ catch*
+ )
+ :replace (set! define-syntax
+ when unless))
((@ (guile) define-syntax) define-syntax
(syntax-rules ()
@@ -212,14 +212,14 @@
;; This function borrowed from web-ics (calendar util)
-(define* (sort* items comperator #:optional (get identity))
+(define* (sort* items comperator optional: (get identity))
"A sort function more in line with how python's sorted works"
(sort items (lambda (a b)
(comperator (get a)
(get b)))))
;; Sorts the list @var{items}. @emph{May} destroy the input list in the process
-(define* (sort*! items comperator #:optional (get identity))
+(define* (sort*! items comperator optional: (get identity))
"A sort function more in line with how python's sorted works"
(sort! items (lambda (a b)
(comperator (get a)
@@ -284,7 +284,7 @@
;; Takes a procedure returning multiple values, and returns a procedure which
;; takes the same arguments as the original procedure, but only returns one of
;; the return values. Which value to return can be sent as an additional parameter.
-(define* (unval proc #:optional (n 0))
+(define* (unval proc optional: (n 0))
(lambda args
(call-with-values (lambda () (apply proc args))
(lambda args (list-ref args n)))))
diff --git a/module/hnh/util/exceptions.scm b/module/hnh/util/exceptions.scm
index 36b018d1..344eb27a 100644
--- a/module/hnh/util/exceptions.scm
+++ b/module/hnh/util/exceptions.scm
@@ -1,10 +1,10 @@
(define-module (hnh util exceptions)
- #:use-module (srfi srfi-1)
- #:use-module (hnh util)
- #:use-module (ice-9 format)
+ :use-module (srfi srfi-1)
+ :use-module (hnh util)
+ :use-module (ice-9 format)
- #:use-module ((system vm frame)
- :select (frame-bindings binding-ref))
+ :use-module ((system vm frame)
+ :select (frame-bindings binding-ref))
:export (warning-handler
warnings-are-errors
diff --git a/module/hnh/util/tree.scm b/module/hnh/util/tree.scm
index 34e10365..8b41609b 100644
--- a/module/hnh/util/tree.scm
+++ b/module/hnh/util/tree.scm
@@ -1,12 +1,12 @@
(define-module (hnh util tree)
- #:use-module (srfi srfi-1)
- #:use-module (srfi srfi-71)
- #:use-module (hnh util)
- #:export (make-tree left-subtree
- right-subtree
- tree-node
- length-of-longst-branch
- tree-map))
+ :use-module (srfi srfi-1)
+ :use-module (srfi srfi-71)
+ :use-module (hnh util)
+ :export (make-tree left-subtree
+ right-subtree
+ tree-node
+ length-of-longst-branch
+ tree-map))
;; Constructs a binary tree where each node's children is partitioned
;; into a left and right branch using @var{pred?}.