diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-10-16 19:39:12 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-10-16 19:40:24 +0200 |
commit | 22f28015981295660ff98b43789f8c4c99134f36 (patch) | |
tree | e6d43c74a23843212e0fc183a1e09ca2b5d2fa17 /module/hnh/util.scm | |
parent | Add `not` case to type validators. (diff) | |
download | calp-22f28015981295660ff98b43789f8c4c99134f36.tar.gz calp-22f28015981295660ff98b43789f8c4c99134f36.tar.xz |
Move timespec and recur-rule to new object system.
Diffstat (limited to 'module/hnh/util.scm')
-rw-r--r-- | module/hnh/util.scm | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/module/hnh/util.scm b/module/hnh/util.scm index d888bea6..2ae5d2c4 100644 --- a/module/hnh/util.scm +++ b/module/hnh/util.scm @@ -3,7 +3,6 @@ :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)) :use-module ((ice-9 copy-tree) :select (copy-tree)) :use-module ((ice-9 control) :select (call/ec)) :export (aif @@ -45,7 +44,6 @@ insert-ordered -> ->> - set set-> and=>> downcase-symbol @@ -487,26 +485,6 @@ ((->> obj func rest ...) (->> (func obj) rest ...)))) -;; Non-destructive set, syntax extension from set-fields from (srfi -;; srfi-9 gnu). -;;; TODO remove this, it's replaced by the true lens version -(define-syntax set - (syntax-rules (=) - [(set (acc obj) value) - (set-fields - obj ((acc) value))] - [(set (acc obj) = (op rest ...)) - (set-fields - obj ((acc) (op (acc obj) rest ...)))])) - -(define-syntax set-> - (syntax-rules (=) - [(_ obj) obj] - [(_ obj (func = (op args ...)) rest ...) - (set-> (set (func obj) (op (func obj) args ...)) rest ...)] - [(_ obj (func args ...) rest ...) - (set-> (set (func obj) args ...) rest ...)])) - (define-syntax and=>> (syntax-rules () [(_ value) value] |