On 1/25/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > It seems to me that "cond+else" and "if" do the same thing. > Not sure why Scheme has/needs BOTH. > > e.g. > > (define (find-sign x) (cond ((< x 0) "negative") > (else "positive"))) > > (define (find-sign x) (if (< x 0) "negative" "positive")) > > > > > cs >
In your example, they do if and cond do look alike. To me, cond looks more like a traditional switch statement. -- Mark Schoonover, CMDBA http://www.linkedin.com/in/markschoonover http://marksitblog.blogspot.com [EMAIL PROTECTED] -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
