mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2026-01-25 03:54:58 -06:00
utils: with-transformation: Deprioritize matching of procedures.
* nonguix/utils.scm (with-transformation): Deprioritize procedure matching.
This commit is contained in:
parent
5f3ad33833
commit
e4459f4802
1 changed files with 11 additions and 11 deletions
|
|
@ -64,17 +64,6 @@ matches PRED."
|
|||
(match obj
|
||||
((? pred)
|
||||
(proc obj))
|
||||
;; TODO: Check if this can be handled as well.
|
||||
((? parameter?)
|
||||
obj)
|
||||
((? procedure?)
|
||||
(lambda args
|
||||
(apply values
|
||||
(map (cut with-transformation proc <> pred)
|
||||
(call-with-values
|
||||
(lambda ()
|
||||
(apply obj args))
|
||||
list)))))
|
||||
((a . b)
|
||||
(cons (with-transformation proc a pred)
|
||||
(with-transformation proc b pred)))
|
||||
|
|
@ -109,6 +98,17 @@ matches PRED."
|
|||
(obj (accessor obj)))
|
||||
(with-transformation proc obj pred)))
|
||||
record-fields))))))
|
||||
;; TODO: Check if this can be handled as well.
|
||||
((? parameter?)
|
||||
obj)
|
||||
((? procedure?)
|
||||
(lambda args
|
||||
(apply values
|
||||
(map (cut with-transformation proc <> pred)
|
||||
(call-with-values
|
||||
(lambda ()
|
||||
(apply obj args))
|
||||
list)))))
|
||||
(_ obj)))
|
||||
|
||||
(define (package-with-alias alias pkg)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue