caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Immediate recursive functions
@ 2005-02-17 15:32 Alex Baretta
  2005-02-17 18:20 ` [Caml-list] " Marcin 'Qrczak' Kowalczyk
                   ` (2 more replies)
  0 siblings, 3 replies; 30+ messages in thread
From: Alex Baretta @ 2005-02-17 15:32 UTC (permalink / raw)
  To: Ocaml

I sometimes feel the need for a mu operator. I'm thinking of something 
like the following:

# (rec f x -> if x <= 0 then 1 else x * (f (pred x))) 5
- : int = 120

as opposed to

(let rec f x = if x <= 0 then 1 else x * (f (pred x)) in f) 5
- : int = 120

This is not really a feature wish so much a bit of insane curiosity. Is 
there any specific reason for not having this in the core language syntax?

Alex

-- 
*********************************************************************
http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL

tel. +39 02 370 111 55
fax. +39 02 370 111 54

Our technology:

The Application System/Xcaml (AS/Xcaml)
<http://www.asxcaml.org/>

The FreerP Project
<http://www.freerp.org/>


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2005-02-24 15:24 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-17 15:32 Immediate recursive functions Alex Baretta
2005-02-17 18:20 ` [Caml-list] " Marcin 'Qrczak' Kowalczyk
2005-02-17 19:00 ` Jason Hickey
2005-02-17 20:33   ` Alex Baretta
2005-02-17 19:18 ` Christian Szegedy
2005-02-17 20:36   ` Alex Baretta
2005-02-17 22:39   ` Camlp4 documentation (was: Immediate recursive functions) Martin Jambon
2005-02-17 23:30     ` [Caml-list] " Richard Jones
2005-02-17 23:51       ` Michael Walter
2005-02-18  0:51     ` Micha
2005-02-18  3:37       ` briand
2005-02-18  5:21     ` Oliver Bandel
2005-02-18  6:51     ` Johann Spies
2005-02-18  8:04     ` [Caml-list] Camlp4 documentation Alex Baretta
2005-02-18  8:54       ` Alex Cowie
2005-02-18 16:20         ` Camlp4 with traditional syntax (was: Camlp4 documentation) Hendrik Tews
2005-02-18 16:28           ` [Caml-list] " Alex Baretta
2005-02-18 22:36             ` Hendrik Tews
2005-02-21 12:28               ` Alex Baretta
2005-02-21 12:55                 ` Bardur Arantsson
2005-02-21 15:22                   ` [Caml-list] Camlp4 with traditional syntax Olivier Andrieu
2005-02-21 16:57                     ` Bardur Arantsson
2005-02-18 18:43           ` [Caml-list] Camlp4 with traditional syntax (was: Camlp4 documentation) Martin Jambon
2005-02-18 22:41             ` Hendrik Tews
2005-02-22 10:29           ` Oliver Bandel
2005-02-22 23:32             ` Richard Jones
2005-02-23  0:01             ` Martin Jambon
2005-02-24  0:47               ` Oliver Bandel
2005-02-24 15:24                 ` William D. Neumann
2005-02-18  8:14     ` [Caml-list] Camlp4 documentation (was: Immediate recursive functions) Robert M. Solovay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).