VincentToups / shadchen-el

shadchen is an emacs lisp pattern matching library
GNU Lesser General Public License v3.0
49 stars 7 forks source link

Incorrectness from concat pattern #14

Open twlz0ne opened 5 years ago

twlz0ne commented 5 years ago
(match "2019-02-27"
    ((concat year "-" month "-" day)
     (list year month day))) ;; => ("02" "2019" "27") ✘

(match "2019-02-27"
  ((concat year "-" (concat month "-" day))
     (list year month day))) ;; => ("2019" "02" "27") ✔︎
VincentToups commented 5 years ago

Interesting - I'll try to get to it, but the implementation is pretty wacky, frankly.

On Wed, Feb 27, 2019 at 10:37 AM twlz0ne notifications@github.com wrote:

(match "2019-02-27"

((concat year "-" month "-" day)

 (list year month day))) ;; => ("02" "2019" "27") ✘

(match "2019-02-27"

((concat year "-" (concat month "-" day))

 (list year month day))) ;; => ("2019" "02" "27") ✔︎

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/VincentToups/shadchen-el/issues/14, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB8-pJKUxc8zAD9WGKk5J5ikTtuhaQvks5vRqZWgaJpZM4bU0LK .