caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* V.null in ocamlgraph
@ 2009-03-11 21:09 Alexy Khrabrov
  2009-03-12 14:41 ` [Caml-list] " Jean-Christophe Filliatre
  0 siblings, 1 reply; 2+ messages in thread
From: Alexy Khrabrov @ 2009-03-11 21:09 UTC (permalink / raw)
  To: OCaml

In some folds over data when creating ocmalgraph's, I'd need an empty  
vertex value, something like V.null, to give to an edge-creating fold  
when I know it's not going to be used.  Currently I have to look ahead  
into the data.  Does it make sense to add a null value to the V  
module, or is there another OCaml way to give a fold an empty V value?

Cheers,
Alexy


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] V.null in ocamlgraph
  2009-03-11 21:09 V.null in ocamlgraph Alexy Khrabrov
@ 2009-03-12 14:41 ` Jean-Christophe Filliatre
  0 siblings, 0 replies; 2+ messages in thread
From: Jean-Christophe Filliatre @ 2009-03-12 14:41 UTC (permalink / raw)
  To: Alexy Khrabrov; +Cc: OCaml

Alexy Khrabrov wrote:
> In some folds over data when creating ocmalgraph's, I'd need an empty 
> vertex value, something like V.null, to give to an edge-creating fold 
> when I know it's not going to be used.  Currently I have to look ahead 
> into the data.  Does it make sense to add a null value to the V 
> module, or is there another OCaml way to give a fold an empty V value?
What about using an option type instead?

I kind of dislike the idea of introducing an infamous "null" value in 
Ocamlgraph...

--
Jean-Christophe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-12 14:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-11 21:09 V.null in ocamlgraph Alexy Khrabrov
2009-03-12 14:41 ` [Caml-list] " Jean-Christophe Filliatre

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