m2ym / optima

Optimized Pattern Matching Library for Common Lisp
271 stars 19 forks source link

Assoc pattern not evaluating :test #120

Open dfmorrison opened 8 years ago

dfmorrison commented 8 years ago

The following example from the documentation fails when actually run against Optima:

CL-USER> (optima:match '(("a" . 123))
           ((assoc "A" 123 :test #'string-equal) t))

It complains about "#'STRING-EQUAL is not a function name or lambda expression". That is, it appears that, while the documentation implies the value of :test is evaluated, it is not being evaluated. And, indeed, the following seems to work:

CL-USER> (optima:match '(("a" . 123))
           ((assoc "A" 123 :test string-equal) t))
T