Version française
Home     About     Download     Resources     Contact us    
Browse thread
How to do this properly with OCaml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Bardur Arantsson <spam@s...>
Subject: Re: How to do this properly with OCaml?
Michael Alexander Hamburg wrote:
> Ouch.
> 
> I bow to your superior experience.
> 
> Is there a syntax which makes treatment of options easy?  That is, if
> about every other line of my library is an action on objects from this
> array, is there a convenient way to use options without cluttering up the
> code?

Well, not sure if it's exactly what you're looking for, but ExtLib has 
an Option module which contains various convenience functions for 
working with option values. See

      http://ocaml-lib.sourceforge.net/doc/Option.html

Cheers,

-- 
Bardur Arantsson
<bardur@imada.sdu.dk>
<bardur@scientician.net>

In anticipation, John licked his own lips.
                         A. Lloyd, http://adamcadre.ac/lyttle.html