Prolog Program to extract Head and Tail Part of the List.
Program:
domains
list = symbol*
predicates
head_tail(list,symbol.list)
clauses
head_tail([H|T),H,T).
goal with output
goal: head_tail([a,b,c,d],X,Y)
output: X=a, Y=["b","c","d"]
No comments:
Post a Comment