I am trying to develop a prolog procedure that will convert numbers in any given list to a list of their square roots, using the univ (=..
). So far I have
convert(X,Y): number(X), Y is X^2.
use([],_,[]).
use([_|X],convert,L):-
convert(X,Y),
L =..[convert,X,Y].
This evaluates false, what could be wrong in my logic or execution?