Pop-Up Thingie
Sidebar
>>> Magnum BBS <<<
Home
Forum
Files
Dark
Log in
Username
Password
Sidebar
Forum
Usenet
COMP.LANG.LISP
(Convert to Brackets) -- (a (b) c) ==> ( [ a [ b ] c ] )
From
HenHanna
@21:1/5 to
All
on Mon Jun 10 17:24:31 2024
;;; Another (nice) way to write this?
(define (atom? x) (not (pair? x)))
(define (cb x) ; Convert to Brackets
(if (atom? x) (list x)
(append '(#\[) (append-map cb x) '(#\])) ))
(define (pcb x)
(format #t " ~% ~a ~a ~S ~% " x (cb x) (length (cb x))))
(pcb 'atom)
(pcb '(a))
(pcb '(a b c))
(pcb '(a (b) c))
(pcb '(a (b ((c) (d e))) 1 2))
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
Who's Online
Recent Visitors
Ab Cadd
Sat Jun 6 15:42:53 2026
from
Sheboygan, Wi
via
Telnet
Centurion
Sat Jun 6 15:32:28 2026
from
Berea, Ohio
via
Telnet
Krenn
Sat Jun 6 11:38:56 2026
from
Sydney, Nsw
via
Telnet
Furryboy
Sat Jun 6 10:56:29 2026
from
Romania, Galati
via
SSH
Centurion
Fri Jun 5 22:28:01 2026
from
Berea, Ohio
via
Telnet
Ab Cadd
Fri Jun 5 17:52:51 2026
from
Sheboygan, Wi
via
Telnet
Gwylbert
Fri Jun 5 06:28:52 2026
from
Sydney, Nsw
via
Telnet
Centurion
Thu Jun 4 23:42:23 2026
from
Berea, Ohio
via
Telnet
System Info
Sysop:
Keyop
Location:
Huddersfield, West Yorkshire, UK
Users:
715
Nodes:
16 (
2
/
14
)
Uptime:
149:32:03
Calls:
12,091
Calls today:
4
Files:
15,000
Messages:
6,517,580