Re: closures

2008-10-26 Thread Tomas Hlavaty
Hi Alex, (let @S '((I . 0)) (def 'count (curry (@S) () (job '@S (inc 'I (def 'reset (curry (@S) () (job '@S (zero I ) (let @S (list (cons 'I 0)) (let I (cons 0) I like it this way, thanks. I also found that once the things inside the closures get complicated,

'pre?', 'sub?' and 'length'

2008-10-26 Thread Tomas Hlavaty
Hi Alex, diving more into picoLisp utility functions I foud some functions that could be extended: For example 'pre?' and 'sub?' could understand lists: (de pre (P L) (let X T (while (and X P L) (if (and (pair P) (pair L) (= (car P) (car L))) (setq P (cdr P) L (cdr