From 73a4bfc3d8e9bb5365e33a11a6ad3b8340d5195b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 12 Jun 2022 21:09:35 +0200 Subject: Remove custom let*. While it was nice, the most important part was the multi-valued let from srfi-71 (which is implemented in srfi-71)). The minor pattern matching structures could often be replaced with car+cdr, or a propper match. --- module/datetime/timespec.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/datetime/timespec.scm') diff --git a/module/datetime/timespec.scm b/module/datetime/timespec.scm index 49a2d90e..9bfcc402 100644 --- a/module/datetime/timespec.scm +++ b/module/datetime/timespec.scm @@ -6,10 +6,11 @@ (define-module (datetime timespec) :export (make-timespec timespec? timespec-time timespec-sign timespec-type) - :use-module ((hnh util) :select (set define*-public unless let*)) + :use-module ((hnh util) :select (set define*-public unless)) :use-module ((hnh util exceptions) :select (warning)) :use-module (datetime) :use-module (srfi srfi-1) + :use-module (srfi srfi-71) :use-module (srfi srfi-9 gnu) :use-module (calp translation) ) @@ -71,7 +72,7 @@ (define*-public (parse-time-spec string optional: (suffixes '(#\s #\w #\u #\g #\z))) - (let* ((type string + (let ((type string (cond [(string-rindex string (list->char-set suffixes)) => (lambda (idx) (values (string-ref string idx) -- cgit v1.2.3