English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-08-27 (11:53)
From: Berke Durak <obdurak@f...>
Subject: Re: [Caml-list] Puzzle
On Fri, Aug 26, 2005 at 12:21:17PM -0700, David Thomas wrote:
> I have three lists that I would like to have sorted
> through user interaction.  I can, of course, say
> "List.sort ask list" for each list.  What if, however,
> rather than sorting each list in turn, I wanted the
> questions to be interleaved, either randomly or in a
> prespecified sequence?  Is it possible to do this
> without reimplementing sort?  I easily could, but it
> seems more fun without...

Of course, you could first ask all the questions to the user and store the
answers, then use List.sort.
Berke Durak