Fundamentals(Chapter 2 of Programming F#)
Code
1 open System
2
3 [
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
转载于//www.cnblogs.com/zhtf2014/archive/2010/05/22/1741767.html
还没有评论,来说两句吧...