So this is my code base structure currently.
trans([], []).
trans([H|T], [NewH|NewT]):-
means(H, NewH),
trans(T,NewT).
means(one, uno) :- !.
means(two, dos) :- !.
means(X, X) :- !.
Question1
This works roughly the way I want it to. For example, if I type in the prolog compiler:
?- trans([bob, uno, dos], X).
X = [bob, uno, dos].
It answers correctly. However if I insert an argument with a capital letter for example:
?- trans([Bob, uno, dos], X).
It throws a bunch of errors for some reason. How can I fix it so this doesn't happen?
Question2
Currently it returns the answer into a List of several words e.g (trans([bob, one, two], X). will return X = [bob, uno, dos].
How can I make it so it returns a list of my words connected? (Like this: X = [bob uno dos] )