📄 member.logic
字号:
/*
Here is a simple example of lists. An element is a member of a list if it is
the head of the list or part of the tail.
Try the query:
member(champion, ["spassky", "fischer", "karpov", "kasparov"])
which should produce the result:
champion = spassky
champion = fischer
champion = karpov
champion = kasparov
no more results
*/
member(X, [X | Rest]);
member(X, [Y | Rest]) :- member(X, Rest);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -