From 6e646c012fd950f3639d23fe083f4cdb17802039 Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Mon, 19 Aug 2019 22:02:06 -0700 Subject: [PATCH] small func recognizes [] and [X]. --- thun/gnu-prolog/thun.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/thun/gnu-prolog/thun.pl b/thun/gnu-prolog/thun.pl index 88ef875..850e1db 100644 --- 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 -- 2.11.0