English 中文(简体)
这究竟意味着什么?
原标题:What does this Haskell definition mean?
Eq a => [a] -> [(Int,a)]

我不知道Eq指的是什么,还是不知道整个定义是什么意思?

问题回答

对定义中使用的<代码>a的这种限制 -> [(Int,a)]:它说,它必须界定的事例。 Eq 打字。 基本上,有<代码>Eq的类型支持平等和不平等的操作者,(=(/=)

详情见learnyouahaskell.com。 uce,类型与办公室的接口有些相似。

这意味着,[a]项的内容必须属于Eq类,这意味着必须证明平等。

a> 如前所述,必须具备Eq等值。 Eq>/em> 类别界定了可与其他类型平等相比较的类型,其次=操作员/操作员

这意味着,你的职责是把项目清单作为唯一参数。

[a] is a list of types a

并填写一份(Int, a)乳制品清单,即一张2-图形清单,其中图中的第一个项目为英特,第二个项目与该功能的列表相同。

(这里不是本地的美国籍社发言人,神学:)





相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

pdo database abstraction

Can someone help me to see what is going wrong with this setup I build the @sql query in the function below like this. The extra quotes are setup in the conditions array. $sql .= " WHERE $...

I wish I could correlate an "inline view"

I have a Patient table: PatientId Admitted --------- --------------- 1 d/m/yy hh:mm:ss 2 d/m/yy hh:mm:ss 3 d/m/yy hh:mm:ss I have a PatientMeasurement table (0 to ...

Syntax help! Php and MYSQL

Original: $sql = "SELECT DATE(TimeAdded) AS Date, $column_name FROM Codes ORDER BY TimeAdded ASC"; Altered: $sql = "SELECT DATE("m", TimeAdded ) AS Date, ColumnName FROM TableName ORDER BY ...

Is this code Equivalent

I am not a fan of the following construction if (self = [super init]) { //do something with self assuming it has been created } Is the following equivalent? self = [super init]; if (self != ...

热门标签