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
Warning on not-tail recursive functions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-08-04 (14:42)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] Warning on not-tail recursive functions


On Sat, 4 Aug 2007, Oliver Bandel wrote:

> What ist with a
>
>  ...
>   ignore (maybe_tailcall())
>  ...
>

That is not a tail call.  You're using the value it returns.

Brian

> Does ignore REALLY ignore the values (does not generate them), so that
> this call is like a true tail-call, or will the maybe_tailcall
> generate and give back results to the ignore-call and then
> ignore throws away the stuff (then it would be NO tailcall).

Throwing away the result is using the result.

Brian