CodePlexProject Hosting for Open Source Software
Declaring and calling inner functions
let FunctionSample2() = let even n = (n%2 = 0) let tick x = printfn "tick %d" x let tock x = printfn "tock %d" x let choose f g h x = if f x then g x else h x let ticktock = choose even tick tock // ticktock is a function built out of other functions using 'choose' for i = 0 to 10 do ticktock i
tick 0tock 1tick 2tock 3tick 4tock 5tick 6tock 7tick 8tock 9tick 10
Last edited Sep 14, 2011 at 2:25 AM by ttliu2000, version 1
There is no recommended release for this project.