Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Alex Baretta <alex@b...>
Subject: Immediate recursive functions
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/>