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

4661Re: "ocaml_beginners"::[] mutually recursive definition of non-function values

Expand Messages
  • Seth J. Fogarty
    Oct 2, 2005
      On 10/2/05, a22_19_22 <a22_19_22@...> wrote:
      > . . .
      > No, the behavior is /very/ well defined. Just not terribly useful.
      > I gotta put my $.02 in here (I think there was a brief mention of
      > cyclic lists in this forum a week or two ago). Cyclic lists can be
      > very useful, just not very often. Off the top of my head:

      Well, I stand gladly corrected.

      > OCaml does make it harder (needlessly IMHO) to use circular lists by
      > raising an exception if the list arguments to two-list iterators such
      > as List.map2 and List.fold_left2 are not of the same length. When
      > lists of different length are allowed, it can be convenient to map or
      > fold over an ordinary list and a circular list.

      These shouldn't be terribly hard to rewrite this way... it's a bit of
      a strange way of thinking about them, but it's very doable. Map and
      fold are four-line functions, and I doubt map2 and fold2 are much

      Seth Fogarty sfogarty@[gmail.com|rice.edu|livejournal]
      Neep-neep at large AIM: Sorrath
      "I know there are people in this world who do not love their fellow
      human beings - and I hate people like that" --Tom Lehrer.
    • Show all 15 messages in this topic