using infix --> to define a lambda form



By the way: (not sure about lbp & rbp)

  (%i20) infix("-->",90,90)$
  (%i21) assume(x < 0)$

  (%i22) f : x --> abs(x);
  (%o22) lambda([x],abs(x))

  (%i23) f : [] --> %pi;
  (%o23) lambda([],%pi)

  (%i24) f : [x,y] --> x+y;
  (%o24) lambda([x,y],x+y)

  (%i30) f : [x,y] --> -x;
  (%o30) lambda([x,y],-x)

(defmspec $--> (l)
  (let* ((op (car (pop l)))
	 (x (if l (pop l) (wna-err op)))
	 (e (if l (pop l) (wna-err op))))
    (if l (wna-err op))
    (take '(lambda) (if ($listp x) x (take '(mlist) x)) e)))

--bw