我有一个函数返回看起来像这样的结果:
(({:one 1}) ({:two 2} ({:three 3} {:four 4})))
Run Code Online (Sandbox Code Playgroud)
是否有一种简单/惯用/有效的方法将上面的列表展平为一个列表:
({:one 1} {:two 2} {:three 3} {:four 4})
Run Code Online (Sandbox Code Playgroud)
map忽略列表级嵌套的函数,并在叶子上运行?reduce而不是map)