Pop-Up Thingie
Sidebar
>>> Magnum BBS <<<
Home
Forum
Files
Dark
Log in
Username
Password
Sidebar
Forum
Usenet
COMP.LANG.SCHEME
Re: Multivalue tail recursion?
From
B. Pym
@21:1/5 to
Kent M. Pitman
on Tue Aug 27 22:19:41 2024
XPost: comp.lang.lisp
Kent M. Pitman wrote:
(loop for x in '(3 5 7)
for y in '(2 5 8)
when (= x y)
collect (cons x y))
What if there were more than two lists?
This will handle any number of lists:
Scheme:
(filter-map
(lambda xs (and (apply = xs) xs))
'(0 3 5 7 9)
'(0 2 5.0 8 9.0)
'(2 4 5 8 9))
((5 5.0 5) (9 9.0 9))
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
Who's Online
Recent Visitors
Andrew Andrew
Tue Sep 15 02:46:28 2026
from
Chicago, Il
via
Telnet
Netmages
Tue Sep 15 01:13:15 2026
from
Santiago, Chile
via
SSH
Rixter
Tue Sep 15 00:01:34 2026
from
Madison, Nc
via
Telnet
Rixter
Mon Sep 14 12:01:34 2026
from
Madison, Nc
via
Telnet
Bob Worm
Mon Sep 14 08:34:31 2026
from
Wales, Uk
via
Telnet
Retrojimmyx
Mon Sep 14 00:27:04 2026
from
Derbyshire
via
Telnet
Rixter
Mon Sep 14 00:01:35 2026
from
Madison, Nc
via
Telnet
Sam Shaxted
Sun Sep 13 14:48:09 2026
from
Sittingbourne, Kent
via
SSH
System Info
Sysop:
Keyop
Location:
Huddersfield, West Yorkshire, UK
Users:
765
Nodes:
16 (
2
/
14
)
Uptime:
36:34:41
Calls:
12,759
Calls today:
3
Files:
15,359
Messages:
6,556,884