If I have a list C
, how do I find out how many times each element is repeated?
This is the rule that I use to get the list:
dna([X, Y]) :-
aminotodna(X, A),
aminotodna(Y, B),
append(A, B, C),
print(C),
nl,
fail.
If I have a list C
, how do I find out how many times each element is repeated?
This is the rule that I use to get the list:
dna([X, Y]) :-
aminotodna(X, A),
aminotodna(Y, B),
append(A, B, C),
print(C),
nl,
fail.