I have no idea if there exists a pattern matching function for Common Lisp, nevertheless I have to make my own function. I have no idea about Lisp. Can somebody give heads-up on
I think you may want the CL-Unification library: http://common-lisp.net/project/cl-unification/