News for hackers. Stuff that matters.
Re:Is Lisp a Blub Language? by yummyfajitas on Monday April 26, 2010 @09:49AM (#1294837)
Same way you would do it in lisp - you'd build a function to do pattern matching and use conditionals to test which pattern is matched.

    (defun solve-poly (p)
        (if (match '(+ (* ?a x) ?b) poly))
            (-b/a  where b, a come from (extract-values-from-pattern-match poly))
           (some code for second order)
     ))
(Some code borrowed from lispm's comment. Not sure which library the match function comes from.)

There are no comments on this comment yet.