Write a predicate remove_n(List,Pos,Result) that indicates that Result is the result of removing Pos form the list List. If Pos is not a valid index in the list, the predicate should fail.
remove_n(List,Pos,Result)
Result
Pos
List
?- remove_n([1,2,3,4],1,X). X=[1,3,4]