Exercises for Essence of Dispatch

Damien Cassou, Stéphane Ducasse and Luc Fabresse http://stephane.ducasse.free.fr

Three Questions

  1. Implement not
  2. Implement | (or) and ifTrue:ifFalse:
  3. What is the goal of these exercises?

Exercise 1: Implement not

Propose an implementation of not in a world where:

   false not
   -> true

   true not
   -> false

Exercise 2: Implement | (or)

Propose an implementation of or in a world where:

   true | true -> true
   true | false -> true
   true | anything -> true

   false | true -> true
   false | false -> false
   false | anything -> anything

Exercise 3: Why These Exercises?

/