Samantha2323
Programmer
Hello I need help on doing this .... I have no idea how to start up.... can you please guide me a little bit
The map_pairs_to_kval_list predicate takes a list of <key,value> pairs and generates a list of values for each key, <key, val1, val2,...>, preserving the order of keys and values. For example:
?- map_pairs_to_kval_list([[jack,a], [jack,b], [jack,f], [jill,cplus],[jill,aminus], [jack,a],[jack,w],[jill,aminus]], X).
X = [[jack,a,b,f,a,w],[jill,cplus,aminus,aminus]]
The map_pairs_to_kval_list predicate takes a list of <key,value> pairs and generates a list of values for each key, <key, val1, val2,...>, preserving the order of keys and values. For example:
?- map_pairs_to_kval_list([[jack,a], [jack,b], [jack,f], [jill,cplus],[jill,aminus], [jack,a],[jack,w],[jill,aminus]], X).
X = [[jack,a,b,f,a,w],[jill,cplus,aminus,aminus]]