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' 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.
Quote from: "Lutz"
[T]here are so many other things to do in the [n]ext months to come (finishing GUI functionality then 2D Graphics) and not to forget about XML call backs, curry-nth etc. ;)
Go Lutz, go! :-)
Quote
2D Graphics
Gets even more interesting what this will mean in practical.
;-)
Quote
Gets even more interesting what this will mean in practical
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).
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

(//%3C/s%3E%3CURL%20url=%22http://alh.net/newlisp/wiki/pix/hombenny4_e0.gif%22%3Ehttp://alh.net/newlisp/wiki/pix/hombenny4_e0.gif%3C/URL%3E%3Ce%3E)
Is it here yet? Oh boy! Oh boy! Oh boy! Is it here yet? Oh boy! Oh boy!..
Just about unify ;-)
I has trying to decide how can I parse syntactical sequence and can I use unify for that.
And I've found a little problem here :-)
Not very important, at this time... We all waiting for the already declared features :-)