From 0c49e3197f5713c72f2d088a4c9f382f6c019ad2 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 30 Mar 2022 23:27:14 -0700 Subject: New function: isecp. * eval.c (eval_init): Register isecp intrinsic. * lib.c (isecp): New function. * lib.h (isecp): Declared. * stdlib/compiler.tl (lambda-apply-transform, dump-compiled-objects): Use isecp instead of isec, since the actual intersection of symbols isn't needed, only whether it exists. * txr.1: Documented. * stdlib/doc-syms.tl: Updated. --- txr.1 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 7ffc3d13..8ae02f17 100644 --- a/txr.1 +++ b/txr.1 @@ -35442,10 +35442,11 @@ function, these functions behave the same as and .codn find-min . -.coNP Functions @, uni @, isec @ diff and @ symdiff +.coNP Functions @, uni @, isec @, isecp @ diff and @ symdiff .synb .mets (uni < iter1 < iter1 >> [ testfun <> [ keyfun ]]) .mets (isec < iter1 < iter1 >> [ testfun <> [ keyfun ]]) +.mets (isecp < iter1 < iter1 >> [ testfun <> [ keyfun ]]) .mets (diff < iter1 < iter1 >> [ testfun <> [ keyfun ]]) .mets (symdiff < iter1 < iter2 >> [ testfun <> [ keyfun ]]) .syne @@ -35469,6 +35470,15 @@ and .metn iter2 , returning a new sequence. +The +.code isecp +is Boolean: it returns +.code t +for those arguments for which +.code isec +returns a non-empty list, otherwise +.codn nil . + The arguments .meta iter1 and -- cgit v1.2.3