caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Recursive lists
@ 2004-10-08 13:20 Luca Pascali
  2004-10-08 13:31 ` Keith Wansbrough
                   ` (2 more replies)
  0 siblings, 3 replies; 45+ messages in thread
From: Luca Pascali @ 2004-10-08 13:20 UTC (permalink / raw)
  To: caml-list

Hi everyone.

I have a little question about the recursive lists.
In an application I needed to use a list composed by some elements 
(placed in the head of the list) and recursive element, like

let rec_list =
    let rec l2 = 100 :: l2 in
       [1;2;3;4;5] @ l2

in order to have the last elements periodically repeated.
In a list like this, I found that the map function goes in stack 
overflow. It seems that it is not aware of the recursive characteristics 
of the input list.
I had to write a version of the map function to support this in my 
software (I have to finalize something before posting it).

My questions are:
Can some functions of the List library support the use of the recursive 
lists?
I mean: can some scanning functions such as map, for_all, exists, mem, 
filter, and so on understand if they are working on recursive lists and 
act correctly without going in buffer overflow or infinite loops?
Did anyone already have a similar needing? And in which way did he/she work?

Thanks in advance to anyone

Luca


-- 
*********************************************************************
Luca Pascali
pasckosky2000@yahoo.it
luca@barettadeit.com
asxcaml-guru@barettadeit.com

http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL

tel. 02 370 111 55
fax. 02 370 111 54

Our technology:
http://www.asxcaml.org/
http://www.freerp.org/

-------------------
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] 45+ messages in thread

end of thread, other threads:[~2004-10-20 22:10 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-08 13:20 [Caml-list] Recursive lists Luca Pascali
2004-10-08 13:31 ` Keith Wansbrough
2004-10-08 14:32   ` skaller
2004-10-08 14:42   ` Alex Baretta
2004-10-08 15:43     ` David Brown
2004-10-08 17:19       ` Alex Baretta
2004-10-08 23:29         ` skaller
2004-10-09  8:35           ` Keith Wansbrough
2004-10-09  9:07             ` skaller
2004-10-09  8:32         ` Keith Wansbrough
2004-10-08 17:18     ` Wolfgang Lux
2004-10-11  0:44   ` Brian Hurt
2004-10-11  6:32     ` William Lovas
2004-10-11  6:52       ` Ville-Pertti Keinonen
2004-10-13 11:29         ` Alex Baretta
2004-10-13 11:22       ` Alex Baretta
2004-10-11  9:04     ` Keith Wansbrough
2004-10-08 14:05 ` Sébastien Furic
2004-10-08 14:44   ` Alex Baretta
2004-10-08 15:09     ` Jon Harrop
2004-10-08 15:13   ` james woodyatt
2004-10-08 14:26 ` sejourne_kevin
2004-10-08 18:28   ` Alex Baretta
2004-10-11  8:01     ` Jean-Christophe Filliatre
2004-10-11  9:20       ` Diego Olivier Fernandez Pons
2004-10-11 13:38       ` [Caml-list] About Obj (was Recursive lists) Christophe Raffalli
2004-10-11 13:49         ` [Caml-list] " Christophe Raffalli
2004-10-11 15:33         ` [Caml-list] " Jon Harrop
2004-10-11 16:09           ` Richard Jones
2004-10-11 16:40           ` [Caml-list] About Obj Yamagata Yoriyuki
2004-10-13 11:59             ` Alex Baretta
2004-10-11 16:24         ` [Caml-list] About Obj (was Recursive lists) james woodyatt
2004-10-11 16:46           ` brogoff
2004-10-11 17:24             ` james woodyatt
2004-10-12  0:19               ` skaller
2004-10-20 22:10             ` Greg K
2004-10-12 15:19           ` Christophe Raffalli
2004-10-13 11:42           ` Alex Baretta
2004-10-13 21:19             ` brogoff
2004-10-14  9:52               ` Andreas Rossberg
2004-10-14 17:38                 ` brogoff
2004-10-15  8:22               ` Alex Baretta
2004-10-15 17:02                 ` brogoff
2004-10-17 13:42                   ` Alex Baretta
2004-10-12  6:17       ` [Caml-list] Recursive lists sejourne_kevin

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