Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Re: Creating a Triple List from a List (David McBride) ---------------------------------------------------------------------- Message: 1 Date: Tue, 2 Mar 2021 09:19:14 -0500 From: David McBride <toa...@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] Creating a Triple List from a List Message-ID: <CAN+Tr43wjX7pDob50xWRtcYhnges=jdus5rqtotclhkzspu...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" If you are okay with a library, you can use the split library for this. stack exec --package split -- ghci >chunksOf 2 [1,2,3,4,5,6] [[1,2],[3,4],[5,6]] On Sat, Feb 27, 2021 at 9:08 PM A. Mc. <47dragonf...@gmail.com> wrote: > Hello, > > What is the best way to take: > [1, 2, 3, 4 ] > > And convert it to: > > [ [ [ 1 ], [ 2 ] ], [ [3]. [4] ] ] > > so that each member pair is: > > [ [1], [2] ] > > roughly analogous to a 1x2 vector? > > Thanks in advance and thank you for your time. > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20210302/fa189b05/attachment-0001.html> ------------------------------ Subject: Digest Footer _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners ------------------------------ End of Beginners Digest, Vol 152, Issue 1 *****************************************