|
|
|
@ -1150,6 +1150,12 @@ new list." |
|
|
|
(puthash :bar 2 hash) |
|
|
|
(puthash :bar 2 hash) |
|
|
|
(-let (((&hash :foo :bar) hash)) (list foo bar))) => '(1 2) |
|
|
|
(-let (((&hash :foo :bar) hash)) (list foo bar))) => '(1 2) |
|
|
|
(-let (((&hash :foo (&hash? :bar)) (make-hash-table)))) => nil |
|
|
|
(-let (((&hash :foo (&hash? :bar)) (make-hash-table)))) => nil |
|
|
|
|
|
|
|
;; Ensure `hash?' expander evaluates its arg only once |
|
|
|
|
|
|
|
(let* ((ht (make-hash-table :test #'equal)) |
|
|
|
|
|
|
|
(fn (lambda (ht) (push 3 (gethash 'a ht)) ht))) |
|
|
|
|
|
|
|
(puthash 'a nil ht) |
|
|
|
|
|
|
|
(-let (((&hash? 'a) (funcall fn ht))) |
|
|
|
|
|
|
|
a)) => '(3) |
|
|
|
(-let (((_ &keys :foo :bar) (list 'ignored :foo 1 :bar 2))) (list foo bar)) => '(1 2) |
|
|
|
(-let (((_ &keys :foo :bar) (list 'ignored :foo 1 :bar 2))) (list foo bar)) => '(1 2) |
|
|
|
;;; go over all the variations of match-form derivation |
|
|
|
;;; go over all the variations of match-form derivation |
|
|
|
(-let (((&plist :foo foo :bar) (list :foo 1 :bar 2))) (list foo bar)) => '(1 2) |
|
|
|
(-let (((&plist :foo foo :bar) (list :foo 1 :bar 2))) (list foo bar)) => '(1 2) |
|
|
|
|