From 6380364e62256e617f70aa1b238540818df480c5 Mon Sep 17 00:00:00 2001 From: dzaima Date: Sun, 18 Dec 2022 23:05:58 +0200 Subject: [PATCH] =?UTF-8?q?native=20highrank=E2=88=8Avector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/builtins/search.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/builtins/search.c b/src/builtins/search.c index ff1eeae3..f35c4149 100644 --- a/src/builtins/search.c +++ b/src/builtins/search.c @@ -112,19 +112,16 @@ B enclosed_0; B enclosed_1; extern B rt_memberOf; B memberOf_c2(B t, B w, B x) { - if (isAtm(x) || RNK(x)!=1) goto bad; + if (isAtm(x) || RNK(x)!=1) return c2(rt_memberOf, w, x); if (isAtm(w)) goto single; - ur wr = RNK(w); - if (wr==0) { - B w0 = IGet(w, 0); - dec(w); - w = w0; - goto single; - } - if (wr==1) goto many; - goto bad; - bad: return c2(rt_memberOf, w, x); + ur wr = RNK(w); + if (wr>0) goto many; + + B w0 = IGet(w, 0); + dec(w); + w = w0; + goto single; B r; single: {