F# 函数式编程语言开源项目

我要开发同款
匿名用户2010年03月05日
97阅读

技术信息

开源地址
https://gitee.com/mirrors/visualfsharp
授权协议
Apache

作品详情

F#是由微软发展的为微软.NET语言提供运行环境的程序设计语言,是函数编程语言(FP,FuctioalProgrammig),函数编程语言最重要的基础是LambdaCalculus。它是基于OCaml的,而OCaml是基于ML函数程式语言。有时F#和OCaml的程式是可以交互编译的。

F#已经接近成熟,支援Higher-OrderFuctio、Curryig、LazyEvaluatio、Cotiuatios、PatterMatchig、Closure、ListProcessig、Meta-Programmig。这是一个用于显示.NET在不同编程语言间互通的程序设计,可以被.NET中的任意其它代码编译和调用。

F#将被集成在VisualStudio2010中,含有对.NetFramework的完全支持。

一些小小范例如下:

(* This is a commet *)(* Sample hello world program *)pritf "Hello World!"

 

#lightope Microsoft.FSharp.Collectio.List(* prit a list of umbers recursively *)let rec pritlist l =    (* Whe usig "#light", you must idet with 4 spaces *)    if l = [] the    else        pritf "%d\" (th l 0)        pritlist (tl l)

 

#light(* Sample Widows Forms Program *)(* We eed to ope the Widows Forms library *)ope System.Widows.Forms(* Create a widow ad set a few properties *)let form = ew Form(Visible=true, TopMost=true, Text="Welcome to F#")(* Create a label to show some text i the form *)let label =    let temp = ew Label()    let x = 3 + (4 * 5)    (* Set the value of the Text*)    temp.Text <- x    (* Remember to retur a value! *)    temp(* Add the label to the form *)do form.Cotrols.Add(label)(* Fially, ru the form *)do Applicatio.Ru(form)

功能介绍

F#是由微软发展的为微软.NET语言提供运行环境的程序设计语言,是函数编程语言(FP,Functional Programming),函数编程语言最重要的基础是Lambda Calculus。它...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论