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
Rixter
Sun Nov 1 12:01:35 2026
from
Madison, Nc
via
Telnet
Fred Blogs
Sun Nov 1 01:53:36 2026
from
Uk
via
SSH
Rixter
Sat Oct 31 23:01:35 2026
from
Madison, Nc
via
Telnet
Bob Worm
Sat Oct 31 21:42:41 2026
from
Wales, Uk
via
Telnet
Amstrad Ppc
Sat Oct 31 19:07:41 2026
from
Wiltshire
via
Telnet
Amstrad Ppc
Sat Oct 31 17:11:55 2026
from
Wiltshire
via
Telnet
Ashenfieldx
Sat Oct 31 16:47:35 2026
from
Guelph, Ontario
via
Telnet
Amstrad Ppc
Sat Oct 31 16:34:27 2026
from
Wiltshire
via
Telnet
System Info
Sysop:
Keyop
Location:
Huddersfield, West Yorkshire, UK
Users:
796
Nodes:
16 (
0
/
16
)
Uptime:
166:49:22
Calls:
13,195
Calls today:
2
Files:
15,489
Messages:
6,579,198