Re: Challenge!
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg948] Re: Challenge!
- From: jorma.virtamo at vtt.fi (Jorma Virtamo)
- Date: Wed, 3 May 1995 00:27:32 -0400
wagner at bullwinkle.cs.Colorado.EDU (Dave Wagner) wrote: >Here's my best shot: > >In[167]:= > interleave[list1_List, list2_List] := > #[[Random[Integer, {1,2}]]]& /@ Transpose[{list1, list2}] An alternative to write this is: If[Random[]<.5, First, Last] /@ Transpose[{list1, list2}] ======================================================= Jorma Virtamo VTT Information Technology / Telecommunications P.O. Box 1202, FIN-02044 VTT, Finland phone: +358 0 456 5612 fax: +358 0 455 0115 email: jorma.virtamo at vtt.fi web: http://www.vtt.fi/tte/ =======================================================