2

Haskell笔记 (19)—— Guard

Posted by nanxiao on 二月 22, 2016 in Haskell笔记 |

guard跟在函数名和参数之后,用管道符号表示: myCompare :: (Ord a) => a – […]

标签:

0

Haskell笔记 (18)—— Polymorphic function和oveloaded function

Posted by nanxiao on 二月 15, 2016 in Haskell笔记 |

A function is called polymorphic (“of many forms”) if i […]

标签:

0

Haskell笔记 (17)—— Value和type

Posted by nanxiao on 二月 15, 2016 in Haskell笔记 |

Because Haskell is a purely functional language, all co […]

标签:

0

Haskell笔记 (16)—— Currying

Posted by nanxiao on 二月 14, 2016 in Haskell笔记 |

Currying定义如下: Currying is the process of transforming a […]

标签:

0

Haskell笔记 (15)—— Type annotation

Posted by nanxiao on 二月 12, 2016 in Haskell笔记 |

当需要显示地指定表达式类型时,可以使用type annotaion,即在表达式后面加上::和需要指定的类型。举 […]

标签:

0

Haskell笔记 (14)—— List comprehension

Posted by nanxiao on 二月 12, 2016 in Haskell笔记 |

在数学中,comprehension可以表示为从一个集合生成另一个集合: {x² | x ∈ {1…5}} […]

标签:

0

Haskell笔记 (13)—— Algebraic data type

Posted by nanxiao on 一月 16, 2016 in Haskell笔记 |

Algebraic data type可以拥有多个value constructor。比如Bool类型就是一种 […]

标签:

0

Haskell笔记 (12)—— 定义新的数据类型(data type)

Posted by nanxiao on 一月 15, 2016 in Haskell笔记 |

使用data关键字来定义一种新的数据类型(data type): data StudentInfo = Stu […]

标签:

0

Haskell笔记 (11)—— 函数的“type signature”

Posted by nanxiao on 一月 14, 2016 in Haskell笔记 |

看一下take函数的type signature: ghci> :type take take :: I […]

标签:

0

Haskell笔记 (10)—— Lazy evaluation

Posted by nanxiao on 一月 13, 2016 in Haskell笔记 |

Haskell中对表达式的计算使用的是Lazy evaluation(也称之为nonstrict evalua […]

标签:

Copyright © 2013-2017 我的站点 All rights reserved.
This site is using the Multi Child-Theme, v2.2, on top of
the Parent-Theme Desk Mess Mirrored, v2.5, from BuyNowShop.com