🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.functional
1 messages
1 total messages Started by Nigel Perry Fri, 07 Sep 1990 08:32
Re: shuffling a list
#457
Author: Nigel Perry
Date: Fri, 07 Sep 1990 08:32
23 lines
1177 bytes
Douglas originally said something like "in Scheme I'd list->vector,
shuffle, vector->list", why not do this in a FL? Hope+C code:

	dec shuffle : list(alpha) -> list(alpha);
	--- shuffle l <= vectortolist(shuffle_vector listtovector(l))

where shuffle_vector is your favorite vector shuffling algorithm
(Hope+C provides map_vector & perm_vector H.O. functions to help
you with these.)

Now all we need is the Haskell solution....


Nigel


---
Nigel Perry                                  Department of Computing
                                             Imperial College
Janet: np@uk.ac.ic.doc                       London
ARPA:  np%uk.ac.ic.doc@ucl-cs                SW7
Uucp:  np@icdoc.UUCP, ukc!icdoc!np           England
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads