Navigation
index
next
|
previous
|
YSC1212 2019
»
YSC1212 Lecture Notes, Week 04
ΒΆ
Polymorphic types
Reminder
Monomorphic types
Polymorphic types
Interlude about the extensional equality of functions
Interlude about functions returning other functions
Exercise 1
Interlude about functions applied to other functions
Exercise 2
Postlude
Version
OCaml: a language with lexical scope and stuff
Resources
Recap
Summing up
Declaring a local variable with a local let-expression
Another example of shadowing
Exercise 3
Declaring several variables with a local let-expression
Pairs, revisited
Tuples, revisited
The empty tuple, revisited
Formals, formally
Interlude
Exercise 4
Resources
Version
Unit tests, revisited
Resources
Unit-test functions, more conveniently
Random numbers
Using random numbers to test the factorial function
Using random numbers to test expected properties
Exercise 5
Interlude
Assertions
A concrete example
Expected failures
Recommended way to compose .ml files
Exercise 6
Shielding unit tests
Resources
Version
The proof is trivial (variations on a theme)
Resources
Situation
Observation
Hypothesis
Experiment
Generating our own random proofs
Exercise 7
Exercise 8
Resources
Version
Exercises
Mandatory exercises
Recommended exercises
Exercise 9
Exercise 10
Version
Previous topic
Exercises
Next topic
Polymorphic types
Quick search
Enter search terms or a module, class or function name.
Navigation
index
next
|
previous
|
YSC1212 2019
»