Fundamentals(Chapter 2 of Programming F#)

水深无声 2021-11-10 00:10 299阅读 0赞

ContractedBlock.gif ExpandedBlockStart.gif 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

转载于:https://www.cnblogs.com/zhtf2014/archive/2010/05/22/1741767.html

发表评论

表情:
评论列表 (有 0 条评论,299人围观)

还没有评论,来说两句吧...

相关阅读

    相关 Life Of Programe

    \[b\] 6个基本素质\[/b\] 基本素质一,是具有良好的编码能力,编码能力直接决定了项目开发的效率。这就要求软件工程师至少精通一门编程语言,比如当前国内企业常用