OSDN Git Service
(root)
/
joypy
/
Thun.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b59e70f
)
small func recognizes [] and [X].
author
Simon Forman
<sforman@hushmail.com>
Tue, 20 Aug 2019 05:02:06 +0000
(22:02 -0700)
committer
Simon Forman
<sforman@hushmail.com>
Tue, 20 Aug 2019 05:02:06 +0000
(22:02 -0700)
thun/gnu-prolog/thun.pl
patch
|
blob
|
history
diff --git
a/thun/gnu-prolog/thun.pl
b/thun/gnu-prolog/thun.pl
index
88ef875
..
850e1db
100644
(file)
--- a/
thun/gnu-prolog/thun.pl
+++ b/
thun/gnu-prolog/thun.pl
@@
-114,6
+114,10
@@
func(bool, [_|S], [true|S]).
func(sqrt, [A|S], [B|S]) :- B is sqrt(A).
+func(small, [[_]|S], [ true|S]).
+func(small, [ []|S], [ true|S]).
+func(small, [ X|S], [false|S]) :- X \= [_], X \= [].
+
/*
Combinators