Daniel Feltey <dfel...@ccs.neu.edu> [16-12-02 09:28]:
> I think something like this works:
> 
> ;; shuffle/seed : list? integer -> list?
> (define (shuffle/seed lst seed)
>   (random-seed seed)
>   (shuffle lst))
> 
> > (define a-list (list 1 2 3 4 5 6 7 8 9 10))
> > (shuffle/seed a-list 0)
> '(3 4 9 8 5 1 10 7 6 2)
> > (shuffle/seed a-list 0)
> '(3 4 9 8 5 1 10 7 6 2)
> > (shuffle/seed a-list 1)
> '(3 2 1 8 5 10 4 7 6 9)
> > (shuffle/seed a-list 1)
> '(3 2 1 8 5 10 4 7 6 9)
> 
> 
> 
> On Fri, Dec 2, 2016 at 2:05 AM, <meino.cra...@gmx.de> wrote:
> 
> > Hi,
> >
> > is there a racket function, which shuffles a list of items
> > based on a seed value...that is: Same seed value results in
> > same shuffle results?
> >
> > Cheers
> > Meino
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to racket-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

HI Daniel,

thanks a lot...exactly for what I have searched for!

Cheers
Meino


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to