Loading ...
Sorry, an error occurred while loading the content.

1404Re: "ocaml_beginners"::[] Self-referencing array init

Expand Messages
  • Nicolas Cannasse
    Oct 1, 2003
    • 0 Attachment
      [...]
      > I don't like the following alternative:
      >
      > let arr = ref None
      > in arr := Some (Array.init 10 ...)

      This is not an alternative, since arr will still be None until Array.init is
      finished.
      BTW, you can't have an array referencing itself because it's type would be :

      array array array array array .....

      (recursive type :)

      Nicolas Cannasse
    • Show all 11 messages in this topic