name = 'del/3' slug = 'delete an element from list' description = '''\
del(X, L1, L2)
: the list L2
is obtained from L1
by deleting element X
.
?- del(1, [1,2,3], L). L = [2,3]. ?- del(2, [1,2,3,2,5], L). L = [1,3,2,5] ; L = [1,2,3,5]. ?- del(X, [1,2,3], L). X = 1, L = [2,3] ; X = 2, L = [1,3] ; X = 3, L = [1,2].''' hint = {}