vindarel / cl-str

Modern, simple and consistent Common Lisp string manipulation library.
https://vindarel.github.io/cl-str/
MIT License
305 stars 37 forks source link

`string-case` does not treat `forms` as `implicit progn` #104

Closed VitoVan closed 1 year ago

VitoVan commented 1 year ago

case:

CL-USER> (case 42
  (42
   (format t "this is 42~%")
   (format t "this is the answer~%")))
this is 42
this is the answer
NIL

string-case:

CL-USER> (str:string-case "42"
  ("42"
   (format t "this is 42~%")
   (format t "this is the answer~%")))
this is 42
NIL

CLHS says the forms of case is an implicit progn.

Should cl-str follow this tradition?

kilianmh commented 1 year ago

This issue was fixed recently in #103 . You can get the fixed version by either

  1. updating the ultralisp dist
  2. cloning the repository
  3. wait for the next quicklisp release
VitoVan commented 1 year ago

Ah, great! Sorry for not searching thoroughly.