MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Split in Mathematica 2.2

  • To: mathgroup at
  • Subject: [mg12796] Re: [mg12777] Split in Mathematica 2.2
  • From: Xah Lee <xah at>
  • Date: Fri, 12 Jun 1998 04:05:29 -0400
  • Sender: owner-wri-mathgroup at

[to moderator: Steve, This is a correct post. Thanks. Xah.]

At 12:04 AM -0700 1998.06.10, Andrzej Kozlowski wrote:
>.. Can anyone suggest a really fast implementation
>of Split that works in version 2.2?

Here's an emulated Split with speed considerations. Basically, it
iterates through the list, mark down where the boundaries should be,
then map Take to the boundary indexes to obtain the new list.

  "split simulates the version 3 build-in function Split. Example:

split[li_,fQ_:SameQ]:=Module[{liLength,index,i},liLength=Length at li;
        Flatten at index];

PS for those wondering what happened to my series of Mathematica
expositions... I got extremely busy with work. I will come back to it
sometimes in the future.

 Xah, xah at
 "Perl: all unix's stupidity in one."

  • Prev by Date: Gridlines
  • Next by Date: Type1 in Mathematica Graphics: How to add
  • Previous by thread: Re: Split in Mathematica 2.2
  • Next by thread: Re: Split in Mathematica 2.2