[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: functional languages ill-suited for large programs?
On 1. Nov 2003, at 00:56, Jan-Willem Maessen wrote:
> peculier Car _ = Car
> peculier _ Truck = Truck
> peculier _ _ = error "Ack!"
> How would you write the above in CLOS? How would you explain it?
What's wrong with:
(defmethod peculier ((car car) par2)
(declare (ignore par2))
(defmethod peculier (par1 (truck truck))
(declare (ignore par1))
(defmethod peculier (par1 par2)
(declare (ignore par1 par2))