Version française
Home     About     Download     Resources     Contact us    
Browse thread
Smells like duck-typing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] Smells like duck-typing

Le 17 oct. 07 à 17:13, Dario Teixeira a écrit :

>> 	type field_t = [
>> 	| `Title of string
>> 	| `Intro of string
>> 	| `Body of string
>> 	| `Field of string * string
>> 	]
>>
>> 	type story_t = field_t list
>>
> Interesting idea,

If this is right for you then what you want is property lists and  
these two solutions [1,2] may be of interest to you.

Daniel

[1] http://mlton.org/PropertyList
[2] http://caml.inria.fr/pub/ml-archives/caml-list/ 
2005/07/1b7a28921aa0a0e002df9e67ace7b60e.fr.html