Skip to content

README

← Back

Basic Info

Functional Programming
└── Lab ML
    └── README.md

More Info

CONTENT

Feb 28

  • Exercise 1
  • ML
  • Running ML
  • Expressions
  • Constants
  • Arithmetic operators
  • String operators
  • Comparisons
  • Logical operations
  • If-then-else
  • Exercise 2
  • Type errors
  • Tuples
  • Coercion
  • Real to integer
  • Conversion between characters and integers
  • Exercise 3
  • Variables
  • Exercise 4
  • Tuples
  • Accessing components of tuple
  • Lists
  • Head of a list
  • Tail of a list
  • Concatenation of lists
  • Combining lists
  • Strings to lists
  • Lists to strings
  • The ML type system: Introduction

Mar 07

  • Exercise 1
  • Functions
  • The ML type system
  • Specifying types
  • Multiple arguments
  • Tuples
  • Referencing external values
  • Exercise 2
  • Recursion
  • Reversing a list
  • Nonlinear recursion
  • Combinations
  • Mutual recursion
  • First attempt
  • Type inference

Mar 14

  • Exercise 1
  • Function definition: Petterns
  • as: Match pattern and assign variables
  • Anonymous variables
  • Patterns
  • Multiple uses of variables
  • Patterns that are not allowed
  • No redundant patterns

Mar 21

  • Exercise 1
  • Local environments using let
  • Decomposing the result of a function
  • Splitting lists

Mar 28

  • Exercise 1
  • Input and Output
  • Printing
  • Printing non-strings
  • Other conversions
  • Exercise 2
  • Input
  • Instreams
  • Reading lines of a file
  • Reading complete files
  • Read a single character
  • Lookahead
  • Are there n characters left?
  • Exercise 3
  • Exceptions
  • User-defined exceptions
  • Exceptions with parameters
  • Handling exceptions

Apr 4

  • Exercise 1
  • Polymorphic functions
  • More on polymorphic functions
  • Equality types
  • Reversing lists
  • Testing for empty list
  • Exercise 2
  • Higher-order functions
  • Integration
  • Some higher-order functions
  • Map
  • reduce
  • Definition of reduce
  • Using reduce to compute variance
  • Infix operators
  • Filter