caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: <tech@diffusionnet.com>
To: <caml-list@inria.fr>
Subject: [Caml-list] crible d'eratosthene
Date: Tue, 24 Apr 2001 17:29:02 +0200	[thread overview]
Message-ID: <00b301c0ccd3$4ab956c0$a3f1fea9@fr> (raw)


Bonjour,

Je suis nouveau ici et en apprentissage sur le langage CAML.

Je suis à la recherche d'un exemple très simple utilisant que des fonctions
de base (listes, pas de boucle) recursivité, concernant le crible
d'eratosthene. J'ai trouvé sur le net des exemples mais rien d'assez simple.

Exemple en clair:

J'ai une liste [1;2;3;4;5;6;7;8;9;10;11;12]
une liste vide qui doit contenir les nombres premiers.

1/ On extrait la tete de la liste (2) pour l'ajouter à la liste des nombres
premiers (initialement vide)
2/ On supprime de la liste des nombres tous les multiples du nombre extrait
lors de l'étape 1
3/ On recommence les étapes 1 et 2 jusqu'à obtention d'une liste vide.

Si qq peut me faire parvenir un source rapidement, je lui en serait très
reconnaissant !!!

Cordialement

CP.

-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


             reply	other threads:[~2001-04-24 15:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-24 15:29 tech [this message]
2001-03-24 18:04 ` Stéphane Baubillier
2001-04-25  7:02   ` Jean-Christophe Filliatre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='00b301c0ccd3$4ab956c0$a3f1fea9@fr' \
    --to=tech@diffusionnet.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).