English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Immediate recursive functions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-02-22 (23:32)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Camlp4 with traditional syntax (was: Camlp4 documentation)
On Tue, Feb 22, 2005 at 11:29:00AM +0100, Oliver Bandel wrote:
> So, if the indended doc on Camlp4 would
> explain in detail what it is good for, what it
> provides and how to use it, I (and IMHO many others)
> would gain a lot of such a documentation/tutorial.

I too am eagerly awaiting a good tutorial on Camlp4.  I've done a few
things using Camlp4, and for me the syntax seems to be needlessly
obscure.  For example, here's how to write an infix 'map_with'
operator, the syntax being: 'list map_with f' which is equivalent to
'List.map f list':

open Pcaml

   expr: AFTER "apply"
   [ LEFTA
       [ e1 = expr; "map_with"; e2 = expr ->
           <:expr< List.map $e2$ $e1$ >>


Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com