pattern-matching in LISP?



I noticed that in the functional language ML there is a way to break a
function's input into various forms in the function header.
For instance:
split(a::b::c) (where :: is ML's equivalent of cons)
This also allows an interesting kind of function overloading where you can
contain several function definitions in a single declaration, each keyed by
the format of the input.
I attempted to do something similar in LISP, using:
defun ( split (cons A B) )

But it didn't appear to work. Does LISP have pattern-matching capabilities
as well?
I'd be sad if it didn't, because I like LISP a lot more than ML. :)


-==Kensu==-
.



Relevant Pages

  • Re: Functions in Lisp
    ... purely functional languages won't let you *cough* Haskell. ... Lisp not being a purely functional language makes it akin to "avoid ...
    (comp.lang.lisp)
  • Re: New Computer Language Shootout?
    ... functional language with first-class lexical closures that can interpret ... let rec fib n = ... In Lisp functions, variables and macros usually have longish names. ... compilers, I think. ...
    (comp.lang.lisp)
  • Re: Functions in Lisp
    ... Lisp not being a purely functional language makes it akin to "avoid ... I'm aware this isn't Haskell but that doesn't mean I would rely on the ... Feel free to ignore the evaluation order that is in fact defined in ANSI Common Lisp if it doesn't matter to you. ...
    (comp.lang.lisp)
  • Re: Newbie Question: Is it allowed for the function to change the value of parameters?
    ... I am really new to functional programming. ... Then Lisp, SML, OCaml and Clean wouldn't be FPLs. ... functional language on c.l.lisp) ... According to some Lispers (Rainer Joswig?) Lisp is a "multi paradigm ...
    (comp.lang.functional)
  • Re: CLOS and C++
    ... > was asked why someone would choose a functional language over an imperative ... > prefer using Lisp (unavailable at school, the closest language on the system ... credit card containers that are sometimes seen in comic ... If you have a class mate who is a video junkie, ...
    (comp.lang.lisp)