如何给表加上括号”()“!
www.dimcax.com
如何给表加上括号”()“!比如我有一个表 :((a b)(c d)(e f)),怎么样才能变成:(((a b)(c d)(e f))),谢谢啊!
d
(mapcar 'list '((a b) (c d) (e f)))
d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
( c:test ( a1 el str)
( txt5 (ukword
1
"1 2 3 4 5 6 7 8 9"
"\n请选择括号形式:1-()/2-()/3-{}/4-[]/5-〔〕/6-「」/7-『』/8-〖〗/9-【】"
txt5
)
a1 ( ( "\n请选择文字 : "))
el ( a1)
str (dxf 1 el)
)
(khxs)
( a1 ( ( 1 str) ( 1 el) el)
)
( a1)
()
)
( dxf (code elist) ( ( code elist)))
( khxs ()
( (( txt5 "1") ( str ( "(" str ")")))
(( txt5 "2") ( str ( "(" str ")")))
(( txt5 "3") ( str ( "{" str "}")))
(( txt5 "4") ( str ( "[" str "]")))
(( txt5 "5") ( str ( "〔" str "〕")))
(( txt5 "6") ( str ( "「" str "」")))
(( txt5 "7") ( str ( "『" str "』")))
(( txt5 "8") ( str ( "〖" str "〗")))
(( txt5 "9") ( str ( "【" str "】")))
( ( str ( "(" str ")")))
)
)
( ukword (bit kwd msg def / inp)
( ( def ( def ""))
( msg ( "\n" msg "<" def ">:")
bit ( 2 ( ( bit 2)))
)
( msg ( "\n" msg ":"))
)
( bit kwd)
( inp ( msg))
( inp
inp
def
)
)
( c:jkh()(c:test))
d
(setq a '((1 2) (3 4)))
(list a)->(((1 2) (3 4)))
d
终于找到思路了,谢谢上面的bobby、samshs、caoyin,呵呵!
d