From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 62BB4BC6B for ; Tue, 30 Oct 2007 01:46:12 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAC8bJkfR4q9KnWdsb2JhbACBWo0FAQEBAQcEBhEY X-IronPort-AV: E=Sophos;i="4.21,345,1188770400"; d="asc'?scan'208";a="3810888" Received: from tomts20-srv.bellnexxia.net ([209.226.175.74]) by mail1-smtp-roc.national.inria.fr with ESMTP; 30 Oct 2007 01:46:11 +0100 Received: from toip7.srvr.bell.ca ([209.226.175.124]) by tomts20-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071030004610.NNRF8273.tomts20-srv.bellnexxia.net@toip7.srvr.bell.ca> for ; Mon, 29 Oct 2007 20:46:10 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4HAB8cJkdBXxTy/2dsb2JhbACBWg Received: from bas1-kitchener06-1096750322.dsl.bell.ca (HELO iron.mattcox.ca) ([65.95.20.242]) by toip7.srvr.bell.ca with ESMTP; 29 Oct 2007 20:46:29 -0400 Received: from matt by iron.mattcox.ca with local (Exim 4.68) (envelope-from ) id 1ImfF0-00010g-7J for caml-list@yquem.inria.fr; Mon, 29 Oct 2007 20:45:58 -0400 Date: Mon, 29 Oct 2007 20:45:58 -0400 From: Matthew William Cox To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Preferred Way to Split a List Message-ID: <20071030004558.GA3860@iron.mattcox.ca> References: <47266DB7.1020009@SmokejumperIT.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline In-Reply-To: <47266DB7.1020009@SmokejumperIT.com> User-Agent: Mutt/1.5.16 (2007-06-11) X-Spam: no; 0.00; cheers:01 wrote:01 caml-list:01 arbitrary:02 preserve:03 depends:04 standard:07 split:08 split:08 practice:09 i'm:09 equivalent:09 fischer:10 roughly:11 william:12 X-Attachments: type="application/pgp-signature" name="signature.asc" --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 29, 2007 at 06:33:11PM -0500, Robert Fischer wrote: > What is the preferred way to split a list into two, at an arbitrary point= ? =20 > There's lots of ways you could do it, but I'm not sure if there's a=20 > standard best practice for this. That's the thing, there are lots of best ways. Which is the best depends on what properties your list-splitter needs. Do you need to preserve ordering in the sublists? Do they need to be roughly equivalent lengths? Elaborating on these requirements will guide your search. Cheers, Matt --3V7upXqbjpZ4EhLz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQIVAwUBRyZ+xWWNSTruhlRWAQJZMg//VRwAkyMTRizEzoIYPssMWsHdK43wg18C aYnshpLKY2sYiPDsbh0QTjkVykODrA2SE+gMc3Is/ygGKcr8chUOkMyNI5sOo7uk 7uA+KAU3KCVRs0+pcHsJvycfyFOWePUQsl/PcHAwGK/SU3jyI8YOxaKOjtNw8uOm OzGuZhXkEcRmXwx7+K7YH9lAT39oqZZGCyVscCkCIQrp9itB+sYNj2yTcXPWzfa0 l7dlo3BIi9I+NLvUZYfDairJ8IcgtIiFUqDB5nbDNTB1b/RRBDm8mmBeHu5MgW7M fGWoPc1blL2lOcgEJ+RRJiorRNcHU0gsjRHdfSTD7uUr4Bli37Pobo/h8o5U+Eqs jBE4n6T+am2stqudZ36QjhWdqDbQKfERPWMncSwqlYa/NYQNysljz19v3lLIqKOa VlXLMZLgk4D/RlzKkMFF2HS9q3L/y1Y2NfRJzzJi+mGE5sTnLjo+LheaqMrZJVAC 7Ji+sS+AKlKG3unKGMfjxwmvvEiC2NkdYRQoYx6kFSQS69JT74rfbjhpLbZYaTcJ Ysd29ByeBVgXreuNI8nnfvOGMYx0ZM79LW2XofA3mcpw4UpyogiMsRBO415TWj1F p8nDBy0qBrdYtbBmwhswrShRero5qp7mEBenOH2OQ+5u/jRMI5KKCdOUfDejW6h3 a54Nlpg8Mw8= =rDCg -----END PGP SIGNATURE----- --3V7upXqbjpZ4EhLz--