d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Need Help In Prolog!! > Intermediate To Advanced
Add Reply New Topic New Poll
Member
Posts: 3,106
Joined: Aug 27 2007
Gold: 12,385.00
Aug 9 2012 06:47pm
So I am making a program to dynamically make playlists from songs with Prolog(swi) and I was wondering if anyone could help me figure something out.

This is what I have
playlist_artist(Artist) :-
song(Title, Artist, Album, Length, Genre),
assert(playlist(Title, Artist, Album, Length, Genre)).

the song module will return the title, and all for every song of that artist, but assert will only be called for the first song. now since its not returning a list of songs, only modifying the Title variable I cant recusivly call assert for each of them, I don't know how to repeat multiple operations otherwise.

Anyone have any suggestion?
Member
Posts: 3,106
Joined: Aug 27 2007
Gold: 12,385.00
Aug 9 2012 06:56pm
ignore this thread... I got it
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll