Prologの再帰呼び出しだと

del(X,[X|L],L).
del(X,[Y|L],[Y|Z]) :− del(X,L,Z).

?− del(r,[f,r,i,e,n,d],X).
X = [f, i, e, n, d] .

これは簡単にRで書ける。

del <− function(x,L)  cat(L[−which(x==L)[1]])

> del(VrV,c(VfV,VrV,ViV,VeV,VnV,VdV))
f i e n d