Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Appending two lists

Status
Not open for further replies.

jingham06

Programmer
Joined
Apr 10, 2008
Messages
1
Location
GB
Say I have a list:

songs([15steps, jigsaw, bodysnatchers]).

but this is within another list.

frame(radiohead, [songs([15steps, jigsaw, bodysnatchers])]).

How would I go about adding a new song to the list, so far the closest i've managed to change it to the follwing using append:

frame(radiohead, [songs([newsong]), songs([15steps, jigsaw, bodysnatchers])]).

But I want them to be in the same list

Thanks for your help
 

use the add command in prolog. add(X,Y,L)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top