This works as expected:
- Code: Select all
? (assoc 'b '((a . 1) (b . 2) (c . 3)))
;; elapsed time = 0.0000s, (0 gc).
= (b . 2)
?
However, this doesn't:
- Code: Select all
? (assoc-if (lambda (key) (string= key "b")) '(("a" . 1) ("b" . 2) ("c" . 3)))
** <domain-error> : function 'string=' requires a <string> received 1.
?
Is the bug on my side or in OpenLisp?