Ed Davis <ed_davis2@yahoo.com> wrote:>Any ideas on how one would implement an "in" operator?>>As in (no pun intended):>> if (a in b,c,d..e)> statements;>>translates to:>> if (a == b or a == c or (a >= d and a <=e))> statements;

I'd be inclined to make 'b,c,d..e' be a literal of some appripriate
type and make 'in' a binary operator taking an object of type T as its
left operand and an object of type 'list of T', 'set of T' or suchlike
as it right operanad. This would also allow constructs like: