i'm a new on Prolog, and i'm already having some problems to understand, the thing is, i was making a test on appending some strings introduced by console:
append_str([],Adder,Adder).
append_str([Head|Tail],Adder,Result):-
append_str(Tail,[Head|Adder],Result).
sread_str(String):-
read(String),
atom(String).
sinput:-
sinput_str([]).
sinput_str(Lista):-
sread_str(String),
sinput_str([String|List]).
sinput_str(List):-
append_str(List,[],Result),
nl,
display(Result),
nl.
And eventually always getting this output:
|-? sinput.
sinput.
hello.
hello.
world.
world.
9.
9.
'.'(hello,'.'(world,[]))
The number is just for the console to end asking for some more values, i don't know what is wrong, thank you guys in advance.