Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] Guards vs. conditionals
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dave Newman <tinman@p...>
Subject: [Caml-list] Can One Define LISP-like Macros in Ocaml?
Seeing the LISP like output from -dlambda reminded me of a question 
I've had about ocaml.

Is there any support for defining macros in ocaml akin to LISP defmacro?


>On Thu, Dec 26, 2002 at 09:55:09PM -0600, Gurr, David (MED, self) wrote:
>>  try "ocamlc -dlambda"
>Wow. That outputs something that looks a lot like LISP. And -dlambda
>seems to be undocumented, at least in the man page and the HTML user's
>manual. What is it intended for?

{{{ text removed }}}

>bash-2.05a$ ocamlc -dlambda
>(setglobal Foo1!
>   (seq
>     (let (foo/56 (function i/57 (if (>= i/57 500) 1a 0a)))
>       (for i/59 1 to 100000
>         (ignore (apply foo/56 (apply (field 4 (global Random!)) 1000)))))
>     (makeblock 0)))
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: