Is there a way to implement something like:
(unify (f A B TAIL) (f g h i j k)) => ((A g) (B h) (TAIL (i j k l))
unify and lists
unify and lists
WBR, Dmi
'unify' in newLISP should (an is) using unification rules as defined in math and computer science. Read more about it here:
http://en.wikipedia.org/wiki/Unification
You are probably thinking of the p([H|T]) mechanism offered in Prolog. If it is possible to implement this using the same three [ | and ] characters and without disturbing the existing rules that would be a nice thing to have, but is further down on my to-do list as there are so many other things to do in the mext months to come (finishing GUI functionality then 2D Graphics) and not to forget about XML call backs, curry-nth etc. ;)
Lutz.
ps: classic Prolog (implemented in Lisp) implements this on top of unify, calling it recursevely on sub terms.
http://en.wikipedia.org/wiki/Unification
You are probably thinking of the p([H|T]) mechanism offered in Prolog. If it is possible to implement this using the same three [ | and ] characters and without disturbing the existing rules that would be a nice thing to have, but is further down on my to-do list as there are so many other things to do in the mext months to come (finishing GUI functionality then 2D Graphics) and not to forget about XML call backs, curry-nth etc. ;)
Lutz.
ps: classic Prolog (implemented in Lisp) implements this on top of unify, calling it recursevely on sub terms.
draw-line, draw-rectangle, darw-circle, set-line-width, set-line-color, etc. Basically the functionality we had in the Tcl/Tk interface with drawing on a canvas, including handling of mouse movements, clicks etc., plus some image and bitblock-transfer handling capabilities and all anti aliased and transparent colors (have those already in the GUI stuff).Gets even more interesting what this will mean in practical
The same demos (hanoi.lsp, turtle.lsp etc) can than be shipped with the new release, but now looking a lot nicer and re-written using a newLISP API.
Lutz