4661Re: "ocaml_beginners":: mutually recursive definition of non-function values
- Oct 2, 2005On 10/2/05, a22_19_22 <a22_19_22@...> wrote:
> . . .Well, I stand gladly corrected.
> 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:
> OCaml does make it harder (needlessly IMHO) to use circular lists byThese shouldn't be terribly hard to rewrite this way... it's a bit of
> 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.
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.
- << Previous post in topic Next post in topic >>