-
42
pages
-
English
-
Documents
Description
Strict Typed Functional Programming in OCamlLecture NotesDavid BromanLink¨oping Universitydavid.broman@liu.seMay 4, 2010 (Updated)Contents1 Introduction 31.1 Solutions of Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.4 Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 The Basics 52.1 Basic Types and Expressions . . . . . . . . . . . . . . . . . . . . 52.2 Calling Functions and Basic IO . . . . . . . . . . . . . . . . . . . 62.3 Defining Functions with Recursion . . . . . . . . . . . . . . . . . 72.4 Lists and Pattern Matching . . . . . . . . . . . . . . . . . . . . . 92.5 Higher-Order Functions, Tuples, and Currying . . . . . . . . . . 102.6 Map, Filter, and Parametric Polymorphism . . . . . . . . . . . . 122.7 List Module and Pipe-Forward . . . . . . . . . . . . . . . . . . . 132.8 Tail-Recursion, Accumulators, and Fold Left . . . . . . . . . . . . 143 Algebraic Data Types 163.1 Recursive Algebraic Data Types . . . . . . . . . . . . . . . . . . 163.2 Enumeration, Polymorphic Algebraic Types, and Options . . . . 183.3 Type Inference - Revisited . . . . . . . . . . . . . . . . . . . . . . 204 Lambda Calculus 214.1 Small-step Interpreter . . . . . . . . . . . . . . . . . . . . . . . . 214.2 Call-by-value . . . . . . . . . . . . . . . . . . . . . . . . . . ...
-
Publié par
-
Langue
English