在本书的前面一些章节里,我们有时候会以限制性的、简单的形式来介绍一些概念。 由于Haskell是一本比较深的语言,所以一次性介绍某个主题的所有特性会令人难以接受。 当基础巩固后,我们就会进行更加深入的学习。
欢迎来到 Haskell 趣学指南!会想看这篇文章表示你对学习 Haskell 有 很大的兴趣。你来对地方了,来让我简单介绍一下这个教学。 撰写这份教学,一方面是让我自己对 Haskell 更熟练,另一方面是希 望能够分享我的学习经验,帮助初学者更快进入状况。网路上已经有无数 Haskell 的教学文件,在我学习的过程中,我并不限于只参考一份来源。我 常常阅读不同的教学文章,他们每个都从不同的角度出发。参考这些资源让 我能将知识化整为零。这份教学是希望提供更多的机会能让你找到你想要得 到的解答。
在這個教程裡,我想解釋一下惰性求值的實現原理,並講清楚 Haskell 的惰性求值在時間和空間上的佔用情況。我會先講一些關於圖規約(Graph Reduction)基礎,然後討論一下關於嚴格(Strict)的左褶疊(Left Fold),用於幫助理解內存空間洩漏問題並解決之。
We describe a method for deepening a student’s understanding of basic physics by asking the student to express physical ideas in a functional programming language. The method is implemented in a second-year course in computational physics at Lebanon Valley College. We argue that the structure of Newtonian mechanics is clarified by its expression in a language (Haskell) that supports higher- order functions, types, and type classes. In electromagnetic theory, the type signatures of functions that calculate electric and magnetic fields clearly express the functional dependency on the charge and current distributions that produce the fields. Many of the ideas in basic physics are well-captured by a type or a function.
This cheat sheet lays out the fundamental elements of the Haskell language: syntax, keywords and other elements. It is presented as both an ex- ecutable Haskell file and a printable document. Load the source into your favorite interpreter to play with code samples shown.
是渣打银行的Don Stewart在Google Tech Talk 2015所做的演讲幻灯片