Expressing an Append comman in Cons
Posted: Mon Jan 03, 2011 9:24 am
Hey everyone,
Im completely new in the lisp world, and i was just doing some programming and would be very grateful to anyone who could help.
In a program i am writing i have one particular line which uses append and takes values such as:
(append '((1 (X 1) (X 1)) (1 (X 1) (Y 1))) '((1 (X 1) (X 1)) (1 (X 1) (Y 1))))
this gives:
((1 (X 1) (X 1)) (1 (X 1) (Y 1)) (1 (X 1) (X 1)) (1 (X 1) (Y 1)))
This is correct for my program, however what i want to do is change the append for a CONS to give the same final answer, however i am finding this increasingly difficult. Just wondering if there was a very simple way to do this.
Thank you in advance
Im completely new in the lisp world, and i was just doing some programming and would be very grateful to anyone who could help.
In a program i am writing i have one particular line which uses append and takes values such as:
(append '((1 (X 1) (X 1)) (1 (X 1) (Y 1))) '((1 (X 1) (X 1)) (1 (X 1) (Y 1))))
this gives:
((1 (X 1) (X 1)) (1 (X 1) (Y 1)) (1 (X 1) (X 1)) (1 (X 1) (Y 1)))
This is correct for my program, however what i want to do is change the append for a CONS to give the same final answer, however i am finding this increasingly difficult. Just wondering if there was a very simple way to do this.
Thank you in advance