📄 ch08ex04.pro
字号:
/*
Turbo Prolog 2.0 Chapter 8, Example Program 4
Copyright (c) 1986, 88 by Borland International, Inc
*/
trace
domains
list = integer*
predicates
add1(list, list)
clauses
add1([], []). /* boundary condition */
add1([Head|Tail], [Head1|Tail1]) :- /* separate the head */
/* from the rest of the list */
Head1= Head+1, /* add 1 to the first element */
add1(Tail, Tail1). /* call element with the rest of the
list */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -