Haskell如何知道你指的是哪个类型类实例?
This question arose while reading the new chapter in the excellent Learn You a Haskell about applicative functors. 在阅读关于应用函子的优秀的学习你的哈斯克尔的新章节时出现了这个问题。 ...
在Haskell中如何检查字符串是否小于另一个字符串?
I have two strings given as arguments to a Haskell function. 我有两个字符串作为Haskell函数的参数。 s1 is smaller than s2 if s1 is shorter than s2 or if they have th...
Haskell 32到64位交叉编译
I only have a x86_32 machine running Linux. On this machine I coded a small Haskell program. 我只有一台运行Linux的x86_32机器。在这台机器上,我编写了一个小的Haskell程序。 Now I nee...
[zz]用 Haskell 实现普通的算法
-- 插入排序 sort::Ord a=>[a]->[a] sort [] = [] sort (x:xs) = insert x (sort xs) insert x [] = [x] insert x (y:ys) | x<=y = x:y:ys ...
在Haskell中解构元组时,元素可以在哪里使用?
I am reading a tutorial that uses the following example (that I'll generalize somewhat): 我正在阅读一个使用以下示例的教程(我将稍微概括一下): f :: Foo -> (Int, Foo)...fList...
《Two Dozen Short Lessons in Haskell》学习(十六)- Definitions with Alternatives
《Two Dozen Short Lessons in Haskell》(Copyright © 1995, 1996, 1997 by Rex Page,有人翻译为Haskell二十四学时教程,该书如果不用于赢利,可以任意发布,但需要保留他们的copyright)这本书是学习 Haskell的一...
《Two Dozen Short Lessons in Haskell》学习(六)
《Two Dozen Short Lessons in Haskell》(Copyright © 1995, 1996, 1997 by Rex Page,有人翻译为Haskell二十四学时教程,该书如果不用于赢利,可以任意发布,但需要保留他们的copyright)这本书是学习 Haskell的一套...
《Two Dozen Short Lessons in Haskell》学习(二)
《Two Dozen Short Lessons in Haskell》(Copyright © 1995, 1996, 1997 by Rex Page,有人翻译为Haskell二十四学时教程,该书如果不用于赢利,可以任意发布,但需要保留他们的copyright)这本书是学习Haskell的一套练...
《Two Dozen Short Lessons in Haskell》学习(五)
《Two Dozen Short Lessons in Haskell》(Copyright © 1995, 1996, 1997 by Rex Page,有人翻译为Haskell二十四学时教程,该书如果不用于赢利,可以任意发布,但需要保留他们的copyright)这本书是学习 Haskell的一套...
《Two Dozen Short Lessons in Haskell》所有习题的索引
《Two Dozen Short Lessons in Haskell》(Copyright © 1995, 1996, 1997 by Rex Page,有人翻译为Haskell二十四学时教程,该书如果不用于赢利,可以任意发布,但需要保留他们的copyright)这本书是学习 Haskell的一套...
《Two Dozen Short Lessons in Haskell》学习(七)- Types
《Two Dozen Short Lessons in Haskell》(Copyright © 1995, 1996, 1997 by Rex Page,有人翻译为Haskell二十四学时教程,该书如果不用于赢利,可以任意发布,但需要保留他们的copyright)这本书是学习 Haskell的...
Haskell与C ++中的简单π(x)
I'm learning Haskell. My interest is to use it for personal computer experimentation. Right now, I'm trying to see how fast Haskell can get. Many clai...
Haskell:: Aeson::基于字段值解析ADT
I'm using an external API which returns JSON responses. One of the responses is an array of objects and these objects are identified by the field valu...
Haskell解析内存不足的大xml文件
So, I've played around with several Haskell XML libraries, including hexpat and xml-enumerator. After reading the IO chapter in Real World Haskell (ht...
如何在Haskell中验证XML(通过XSD文件)?
I am already using HXT for transforming XML. Now I want to validate the input and output against a XSD-file. 我已经在使用HXT来转换XML。现在我想对一个xsd文件验证输入和输出。 HXT ...
初识Haskell
在COMP30026 Models of Computation中接触了新的编程语言Haskell,一个之前听都没有听过的语言,在此记录关于Haskell的一些最基本概念。1.Haskell是一个函数式编程语言(functional programming language),函数式编程语言最基本的...
Haskell ghci用*和max读取行为
So I've just encountered the following in ghci: 所以我刚刚在ghci中遇到了以下内容: (*) (read "10") (read "20") returns 200 as expected. However, this line 按预期返回2...
Java 8的可选、Scala的选项和Haskell的选项之间的关键区别是什么?
I've read a few posts on Java 8's upcoming Optional type, and I'm trying to understand why people keep suggesting it's not as powerful as Scala's Opti...
Haskell:为Zippers创建类型类
So I've been reading a bit about the Zipper pattern in Haskell (and other functional languages, I suppose) to traverse and modify a data structure, an...
是否有使用严格评估的Haskell编译器或预处理器?
I'm looking for a Haskell compiler that uses strict evaluation by default instead of lazy evaluation. I would just use OCaml, but Haskell's syntax is ...