Ray's playground

 

Fundamentals(Chapter 2 of Programming F#)

Code
 1 open System
 2 
 3 [<EntryPoint>]
 4 let main(args: string[]) = 
 5     let numbers = [1 .. 10]
 6     let square x= x * x
 7 
 8     let squaredNumbers = List.map square numbers
 9     printfn "SquaredNumbers %A" squaredNumbers
10 
11     printfn "(press any key to continue)"
12     Console.ReadKey(true|> ignore
13 
14     0

 

posted on 2010-05-22 21:11  Ray Z  阅读(204)  评论(0编辑  收藏  举报

导航