caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] static variables in a function
@ 2002-06-14 17:08 Shannon --jj Behrens
  2002-06-14 17:40 ` Stefano Zacchiroli
  2002-06-14 17:58 ` Yutaka OIWA
  0 siblings, 2 replies; 21+ messages in thread
From: Shannon --jj Behrens @ 2002-06-14 17:08 UTC (permalink / raw)
  To: caml-list

Hi,

What is the correct OCAML idiom for achieving the
following psuedocode?

let get_chunk () =
  static chunks_list;

  if List.is_empty chunks_list
  then chunks_list = get_more_chunks ();
  shift chunks_list
;;

Thanks You,
-jj

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2002-06-23 21:18 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-14 17:08 [Caml-list] static variables in a function Shannon --jj Behrens
2002-06-14 17:40 ` Stefano Zacchiroli
2002-06-14 17:58 ` Yutaka OIWA
2002-06-14 20:43   ` Shannon --jj Behrens
2002-06-15  4:42   ` Max Kirillov
2002-06-15  6:36     ` John Prevost
2002-06-15 14:51       ` Max Kirillov
2002-06-15 16:14         ` John Prevost
2002-06-15 19:19           ` Max Kirillov
2002-06-15 23:16             ` John Prevost
2002-06-16 23:19             ` Remi VANICAT
2002-06-17 13:56               ` [Caml-list] Memoizing (was: static variables...) Benedikt Rosenau
2002-06-18  8:40                 ` William Lovas
2002-06-18  9:16                   ` Jacek Chrzaszcz
2002-06-18 21:52                     ` William Lovas
2002-06-18 13:07                   ` Christopher Quinn
2002-06-18 14:07                     ` Remi VANICAT
2002-06-18 17:52                       ` Christopher Quinn
2002-06-19 14:42                   ` John Max Skaller
2002-06-23 21:18                     ` Pierre Weis
2002-06-19  4:38   ` [Caml-list] static variables in a function Shannon --jj Behrens

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).