Login:  Password:  
EnFeauTec: SiteNews/LanguageAdvance ...

newLISP advance

newLISP has a very useful built-ins set, but sometimes I want to slightly more elegance from the regular code.
All the described functions are parts of funlib.lsp, and there are a few of nice algorithmic ones,
but thoose mentioned here are really frequently used by me now...



(doif (sym expr) expr-yes expr-no)
equivalent to:
(let (sym expr)

(if sym expr-yes expr-no))

rickiboy from newlisp forum has refered to “anaphoric if” to describe doif trick.


(push-end val lst)
equivalent to: (push val lst -1)


(lesser val)
equivalent to: (- val 1)


(greater val)
equivalent to: (+ val 1)


(int10 val val-default)
equivalent to: (int str (if def def 0) 10))

There are no files on this page. [Display files/form]
There is no comment on this page. [Display comments/form]
firstVDS.ru