I was resolving some prolog exercises when I fond myself with some difficulties resolving the following one: Consider you have this fact base about object:
object(obj1).
object(obj2).
object(obj3).
object(obj4).
object(obj5).
material(obj1,wood).
material(obj2,wood).
material(obj3, glass).
material(obj4, glass).
material(obj5, iron).
type(obj1, able).
type(obj2, chair).
type(obj3, mesa).
type(obj4, jar).
type(obj5, rattle).
weight(obj1, 10.5).
weight(obj2, 1.5).
weight(obj3, 1.6).
weight(obj4, 0.5).
weight(obj5, 1.8).
Now the idea is to make the predicate object_description(List) where List is the joining of each object with it's caracteristics, something like:
([obj1-wood-table-10.5, obj2-wood-chair-1.5, …, obj5-iron-rattle-1.8] )
I tried using bagof and findall but couldn't find the right answer.
Thx in advance