[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: case using other equality-testing predicates
From: David A. Moon <Moon@SCRC-STONY-BROOK.ARPA>
Subject: case using other equality-testing predicates
So where would additional options, such as :KEY and an option that
controls whether or not the keys at the heads of the clauses are
evaluated, go in your syntax?
Do we really need additional options? Its easy to get the behavior of
a :key option in the obvious way, after all:
(ncase (car item) #'eq
(a (do-a))
(b (do-b))
(otherwise (lose)))
is at least as clear as:
(ncase item
(:test #'eq :key #'car)
(a (do-a))
(b (do-b))
(otherwise (lose)))
or something, and since none of the other case macros make it possible
to evaluate the "keys at the heads of the clauses" I am not sure why
this one should.