From 92be6184625250720f874a4c2219a2e5f2f1b70c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 21 Jan 2021 18:19:18 -0800 Subject: matcher: @(some) and @(all) work with sequences. Relax the restrictions in these operators so they work with sequences rather than specifically lists. * share/txr/stdlib/match.tl (compile-loop-match): Make the necessary adjustments so that abstract iteration is used. * txr.1: Documented. --- txr.1 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 90de24f1..ce6f045f 100644 --- a/txr.1 +++ b/txr.1 @@ -40058,10 +40058,11 @@ The .code all and .code all* -pattern operators require the corresponding object to be a list. +pattern operators require the corresponding object to be a sequence. + The specified .meta pattern -is applied against every element of the list. The match is successful if +is applied against every element of the sequence. The match is successful if .meta pattern matches every element. @@ -40076,13 +40077,13 @@ and .code all* is as follows. The .code all -operator respects the vacuous truth of the match when the list is empty. +operator respects the vacuous truth of the match when the sequence is empty. In that case, the match is successful, and the variables are all bound to the empty list .codn nil . In contrast, the alternative .code all* -operator behaves like a failed match when the list is empty. +operator behaves like a failed match when the sequence is empty. .TP* Examples: @@ -40103,10 +40104,10 @@ operator behaves like a failed match when the list is empty. .desc The .code some -pattern operator requires the corresponding object to be a list. +pattern operator requires the corresponding object to be a sequence. The specified .meta pattern -is applied against every element of the list. The match is successful if +is applied against every element of the sequence. The match is successful if .meta pattern finds a matching element. -- cgit v1.2.3