Introduction to Haskell
"I know why you're here. ...why you hardly sleep, why night after night, you sit by your computer."

Features of Haskell
- Purely functional
- Statical typed
- Lazy
1. Purely functional
- Every input has a corresponding output
- f(x) = x² + 1
Powerful function compositions
g(x) = x - 1
g(f(x)) = x²
PURE
That means no side effects
A function will never modify a global variable
Order doesn't matter!
Easy concurrency
Functional:
Haskell, Lisp, ML, Scheme, Erlang
Focuses on the high-level "what"
Imperative:
C++, Java, Python, Pascal
Focuses on the low-level "how"
2. Statically Typed
- f x = x² + 1
- f :: Int → Int
- There is never confusion about types
(Bool, Int, Char, etc)
- Strong formalism. The proof is the code.
- If your code compiles, you're 99% done
3. Lazy?
- Nothing is evaluated unless necessary
The list will only be sorted enough to find the minimum
- Allows infinite data structures
Introduction to Haskell的更多相关文章
- 初识Haskell 五:自定义数据类型和类型类
对Discrete Mathematics Using a Computer的第一章Introduction to Haskell进行总结.环境Windows 自定义数据类型 data type de ...
- 初识Haskell 四:函数function之二 常见函数
对Discrete Mathematics Using a Computer的第一章Introduction to Haskell进行总结.环境Windows,关于函数的部分太长了,分开写. 常用的对 ...
- 初识Haskell 三:函数function
对Discrete Mathematics Using a Computer的第一章Introduction to Haskell进行总结.环境Windows 函数毫无疑问是函数式语言的核心. 在Ha ...
- 初识Haskell 二:基本操作符、类型Type、数据结构
对Discrete Mathematics Using a Computer的第一章Introduction to Haskell进行总结.环境Windows 1. 在安装了ghci后,便可以进行Ha ...
- (转)Awesome Courses
Awesome Courses Introduction There is a lot of hidden treasure lying within university pages scatte ...
- Github上的1000多本免费电子书重磅来袭!
Github上的1000多本免费电子书重磅来袭! 以前 StackOverFlow 也给出了一个免费电子书列表,现在在Github上可以看到时刻保持更新的列表了. 瞥一眼下面的书籍分类目录,你就能 ...
- Github 的一个免费编程书籍列表
Index Ada Agda Alef Android APL Arduino ASP.NET MVC Assembly Language Non-X86 AutoHotkey Autotools A ...
- Haskell 参考资料
1.Haskell 中文社区:www.haskellcn.org 2.Haskell 官网: www.haskell.org 3.Haskell 函数查询:www.haskell.or ...
- [2017.02.21] 《Haskell趣学指南 —— Learning You a Haskell for Great Good!》
{- 2017.02.21 <Haskell趣学指南 -- Learning You a Haskell for Great Good!> [官网](http://learnyouahas ...
随机推荐
- def
a = 97,A = 65,z = 122,Z = 90 小写字母比大写字母整形数值高,upper->lower相差32 把小写字母转化成大写字母,将小写字母 - 32 1. typedef 数 ...
- jenkins smtp设置调试
- 理解CSS中BFC
BFC(Block Formatting Context) 是Web页面中盒模型布局的CSS渲染模式.它的定位体系 属于 常规文档流 .摘自 W3C : 浮动,绝对定位元素, inline-block ...
- -webkit-filter属性用来干什么
这两天有看到国外网站纷纷介绍-webkit-filter,开始很迷惑,丫是想要学IE吗?今天看了下,和IE的滤镜没一毛关系啊,而且,效果很赞! 这些滤镜效果最初是用于SVG的,W3C引入到CSS中,然 ...
- toggleClass
toggleClass 用来给匹配元素切换类 语法 参考 http://www.w3schools.com/jquery/html_toggleclass.asp $(selector).toggle ...
- 前端代码优化: 使用YUI Compressor
通过压缩组件,可以显著减少HTTP请求和响应事件.这也是减小页面大小最简单的技术,但也是效果最明显的. 压缩JS,CSS代码有几种常用插件,YUI Compressor是个不错的选择.通过maven的 ...
- Target Operator ID has No Access to Upgrade
If you are attempting to migrate a project between environments through application designer you mig ...
- MongoDb gridfs-ngnix文件存储方案 - 图片
http://www.cnblogs.com/wintersun/p/4622205.html 在各类系统应用服务端开发中,我们经常会遇到文件存储的问题. 常见的磁盘文件系统,DBMS传统文件流存储. ...
- C++实现01串排序
题目内容:将01串首先按长度排序,长度相同时,按1的个数从少到多进行排序,1的个数相同时再按ASCII码值排序. 输入描述:输入数据中含有一些01串,01串的长度不大于256个字符. 输出描述:重新排 ...
- java中4中类修饰符访问范围
public:本类中可见,同包中可见,子类中可见,其他包中可见. protected:本类中可见,同包中可见,子类中可见,其他包不可见. 默认:本类中可见,同包中可见,子类不可见,其他包不可见. pr ...