Code: Select all
(define (cu fun)
(letex (Fun fun Args (args))
(lambda () (apply Fun (append 'Args (args))))))
((cu + 1 2 3) 4 5) → 15
Code: Select all
(define (cu fun)
(letex (Fun fun Args (args))
(lambda () (apply Fun (append 'Args (args))))))
((cu + 1 2 3) 4 5) → 15
Oh, yes, I must learn more about newlisp way. The problem is that I have too much previous mis-knowledge: I am fluent in both traditional scripting languages (perl, python) and traditional lisp (scheme), but newlisp is none of them. ;-) Right now I am converting some of my small python scripts to newlisp -- just to learn from experience. And I immediately found an usage for built-in curry:cormullion wrote:So the answer to many of your questions about the design of newLISP is going to be related to the way these criteria can be met.
Code: Select all
(map (curry format markup) cookies)
Code: Select all
(dolist (word (or (find-all {pattern} (current-line)) '())) ...)