Re: Lists and Recursion
- To: mathgroup at smc.vnet.net
- Subject: [mg9515] Re: Lists and Recursion
- From: Hein Hundal <hundalhm at vicon.net>
- Date: Sat, 8 Nov 1997 23:04:42 -0500
- Sender: owner-wri-mathgroup at wolfram.com
W. Meeussen wrote: > > hi Joana, > > something like parts[li_]:=If[AtomQ[li],li,{li,Sequence@@parts/@li}] > I like parts[{}] = {{}}; parts[li_List]:= Join[#, Prepend[#,First[li]]& /@#]& [parts[Rest[li]]]; but something shorter should exist. Hein