Skip to content

Lab ML

← Back

Basic Info

Functional Programming
└── Lab ML
Name Type Item Size
0​228 / 10 items 7 KiB
0​307 / 19 items 5 KiB
0​314 / 13 items 4 KiB
0​321 / 7 items 2 KiB
0​328 / 9 items 4 KiB
0​404 / 13 items 8 KiB
0​411 / 5 items 1 KiB
0​429 / 7 items 2 KiB
0​506 / 2 items 932 B
0​509 / 1 item 3 KiB
README md / 2 KiB

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