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 ...
随机推荐
- 2016-03-10:libx265源码解析
单步跟踪执行流程 将cli设定为启动项目,在属性->调试->命令行参数中设置如下参数: --input E:\video\pedestrian_area.yuv --fps 24 --in ...
- extern “C”调用测试与验证-2016.01.06
1 调用情形说明 在上一篇关于extern “c”原理以及用法中,详细的说明了为什么需要extern “c”以及如何使用它解决c与c++混合编程时遇到的问题.接下来,使用示例验证方式验证c与c++函数 ...
- 自定义Attribute 服务端校验 客户端校验
MVC 自定义Attribute 服务端校验 客户端校验/* GitHub stylesheet for MarkdownPad (http://markdownpad.com) *//* Autho ...
- 解决mysql占用IO过高
1.日志产生的性能影响:由于日志的记录带来的直接性能损耗就是数据库系统中最为昂贵的IO资源.MySQL的日志包括错误日志(ErrorLog),更新日志(UpdateLog),二进制日志(Binlog) ...
- input文本框实现宽度自适应代码实例,input文本框
本章节介绍一下如何让一个文本框的宽度能够随着文本框中的内容的宽度增长而增长,也就是能够实现宽度自适应效果. 代码实例如下: <!DOCTYPE html> <html> < ...
- Aspose插件
Eclipse安装地址: http://apps.aspose.com/marketplace/eclipse/asposewizardrepo
- phpcms后台部分修改
1.后台登陆前提示信息取消及成功后提示信息取消. (1)后台登陆前提示信息取消 phpcms\modules\admin\classes\admin.class.ph ...
- Python核心编程--学习笔记--2--Python起步(下)
16 文件和内建函数open(),file() 打开文件: fobj = open(filename, 'r') for eachLine in fobj: print eachLine, #由于每行 ...
- Python学习教程(learning Python)--2.1 Python下自定义函数
在Python里可以自定义函数,实现某特定功能,这里首先要区分一下函数的定义和函数的调用两个基本概念,初学者往往容易混淆. 函数的定义是指将一堆能实现特定功能的语句用一个函数名标识起来,而函数的调用则 ...
- [整理归档]30 common tasks you perform using the GUI that you can do faster in Windows PowerShell
主要内容来自于 http://channel9.msdn.com/Events/TechEd/Australia/2014/DCI316 可以下载PPT以及视频,个人只是整理一下平时常用的 NetWo ...