Added pattern matching
ref variables now do pattern matching. This means that, say, the variable binding the (car cursor) in (in-list ...) can be a (ice-9 match) pattern: (loop/list (((a . b) (in-list '((1 ignore) (2 ignore) (3 ignore)))) a) ;; => (1 2 3)
This commit is contained in:
parent
093d1319d9
commit
2dc4a72790
1 changed files with 6 additions and 5 deletions
11
goof.scm
11
goof.scm
|
|
@ -38,7 +38,8 @@
|
|||
((srfi srfi-1) #:select (circular-list))
|
||||
(srfi srfi-71)
|
||||
(rnrs io simple)
|
||||
(ice-9 futures))
|
||||
(ice-9 futures)
|
||||
(ice-9 match))
|
||||
|
||||
(define-aux-syntaxes
|
||||
;; Auxiliary syntax for the loop clauses
|
||||
|
|
@ -297,7 +298,7 @@
|
|||
(begin
|
||||
ff-cur ...
|
||||
(final-fun final-value ...))
|
||||
(let (refs ...)
|
||||
(match-let (refs ...)
|
||||
(user-let () () (user-lets ...)
|
||||
(if (and user-whens ...)
|
||||
(let-kw-form name
|
||||
|
|
@ -338,7 +339,7 @@
|
|||
(begin
|
||||
ff-cur ...
|
||||
(final-fun final-value ...))
|
||||
(let (refs ...)
|
||||
(match-let (refs ...)
|
||||
(user-let () () (user-lets ...)
|
||||
(if (and user-whens ...)
|
||||
(cond
|
||||
|
|
@ -388,7 +389,7 @@
|
|||
(begin
|
||||
ff-cur ...
|
||||
outer)
|
||||
(let (refs ...)
|
||||
(match-let (refs ...)
|
||||
(user-let () () (user-lets ...)
|
||||
(if (and user-whens ...)
|
||||
(cond
|
||||
|
|
@ -423,7 +424,7 @@
|
|||
(begin
|
||||
ff-cur ...
|
||||
outer)
|
||||
(let (refs ...)
|
||||
(match-let (refs ...)
|
||||
(user-let () () (user-lets ...)
|
||||
(if (and user-whens ...)
|
||||
(cond
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue