Arc Forumnew | comments | leaders | submitlogin
1 point by icemaze 6167 days ago | link | parent

I believe it should be:

  (<= (len body) 1)
Also, this doesn't work with odd arguments. Working to fix that.


1 point by icemaze 6167 days ago | link

Here it is:

  (mac aif args
    (let ln (len args)
      (if (is ln 0) nil
          (is ln 1) (car args)
          `(let it ,(car args)
              (if it ,(cadr args) (aif ,@(cddr args)))))))

-----

1 point by icemaze 6167 days ago | link

Er, ok, byronsalty's version works fine. Stupid me. :P

-----