From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 78790BBAF for ; Thu, 12 Mar 2009 15:41:23 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlEDANu7uEmBrw8EgWdsb2JhbACVNAEBFiK9SoQNBg X-IronPort-AV: E=Sophos;i="4.38,351,1233529200"; d="scan'208";a="22456143" Received: from ext.lri.fr ([129.175.15.4]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 12 Mar 2009 15:41:23 +0100 Received: from localhost (localhost [127.0.0.1]) by ext.lri.fr (Postfix) with ESMTP id 3E1ADA4401; Thu, 12 Mar 2009 15:41:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lri.fr Received: from ext.lri.fr ([127.0.0.1]) by localhost (ext.lri.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jc2ExT++YSwI; Thu, 12 Mar 2009 15:41:23 +0100 (CET) Received: from [192.168.1.47] (163.45.64-86.rev.gaoland.net [86.64.45.163]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ext.lri.fr (Postfix) with ESMTP id 17C59A43FD; Thu, 12 Mar 2009 15:41:23 +0100 (CET) Message-ID: <49B91F12.4030103@lri.fr> Date: Thu, 12 Mar 2009 15:41:22 +0100 From: Jean-Christophe Filliatre User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: Alexy Khrabrov Cc: OCaml Subject: Re: [Caml-list] V.null in ocamlgraph References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; filliatre:01 filliatre:01 lri:01 ocaml:01 wrote:01 caml-list:01 data:02 data:02 module:03 vertex:05 null:05 null:05 i'd:06 fold:06 fold:06 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