How can i display a list :
Sorted = [p(201, 15, 2), p(301, 15, 3), p(401, 30, 4), p(501, 75, 5)].
in this format:
201 15 2
301 15 3
401 30 4
501 75 5
i used display(Sorted)
, is there any other function to solve this ?
How can i display a list :
Sorted = [p(201, 15, 2), p(301, 15, 3), p(401, 30, 4), p(501, 75, 5)].
in this format:
201 15 2
301 15 3
401 30 4
501 75 5
i used display(Sorted)
, is there any other function to solve this ?
forall(member(p(X, Y, Z), Sorted), format('~w ~w ~w~n', [X, Y, Z])).
Result in swi-prolog:
201 15 2
301 15 3
401 30 4
501 75 5