Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] static variables in a function
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Shannon --jj Behrens <jjinux@y...>
Subject: [Caml-list] static variables in a function

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,

Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: