English 中文(简体)
F#中的“移民”究竟是什么?
原标题:What exactly is "bigint" in F#?
  • 时间:2010-11-07 19:31:48
  •  标签:
  • f#

我的理解是,<代码>bigint不是功能,而是类型构造。 造成这种情况的原因如下:

// Won t compile
let foo = 10 |> bigint

我的理解是,我可以设立一个新的职能,接受一种分类和回归代码,然后管道运营商将开展工作。

然而,我不理解为什么这项工作:

let bar = bigint 10

如果bigint 是个类型构造者,为什么不需要new<>code>? 如果确切为<代码>bigint,则定义为系统上的一个要素。 肿瘤。 BigInteger s Constructionor?

最佳回答

偏重为系统类型的振动。 肿瘤。 重整

let x = bigint 10

您实际上创立了BigInteger。 在F# new中,建筑商可选择使用,在创建可应用的工种时,基本上应当使用。

问题回答

暂无回答




相关问题
F#: Storing and mapping a list of functions

I have a number of events that happen in a game. I want to control the time and order at which these events occur. For example: Event 1: Show some text on screen for N frames & play a sound ...

Creating Silverlight 3 applications with F#

Is there an easy way to create Silverlight 3 applications with F# (October CTP)? I have seen the F# for Silverlight, but that only works with the May CTP. I am using Visual Studio Integrated Shell ...

How To Change List of Chars To String?

In F# I want to transform a list of chars into a string. Consider the following code: let lChars = [ a ; b ; c ] If I simply do lChars.ToString, I get "[ a ; b ; c ]". I m trying to get "abc". I ...

Unzipping ZLIB compressed portions of a binary file

I m reading a file(a flash swf) from .Net 3.5 that has a header which states whether the body of the file/Stream is compressed or not. However, I m having problems-after I rewrap the basic File ...

Pretty print a tree

Let s say I have a binary tree data structure defined as follows type a tree = | Node of a tree * a * a tree | Nil I have an instance of a tree as follows: let x = Node (Node (...

F# String Pattern-Matching with Wildcards

As part of a project I have assigned myself as a way of improving my knowledge of F# and functional programming in general, I am attempting to write a string pattern-matching algorithm from scratch ...

热门标签