Exercise 4 - Closed intervals whose bounds are integersExercisesExercise 2 - Type inferenceExercise 3 - Local definitionsDocumentation and user's manualTable of contentsOCaml programs

Exercise 3 - Local definitions

The three expressions in the second column are syntactically correct and have values of the same type:

2

function (a, b, c) -> ((a + b) + c) / ((a + b) - c)

3

function (a, b, c) -> ((a + b) / (b + c)) + ((b + c) / (a + b))

3

function (a, b, c) -> (((c + (a + b)) / (c - (a + b))) / a)
           + (a / ((c + (a + b)) / (c - (a + b))))

 1 
  What is this type?

 2 
  For each of them use the notion of local definition to write an expression having the same value and containing as many occurrences of the  +  operator as written in the first column.


Latest update : October 5, 2006
This document was translated from LaTeX by Hyperlatex 2.5, which is not the latest version of Hyperlatex.

Exercise 4 - Closed intervals whose bounds are integersExercisesExercise 2 - Type inferenceExercise 3 - Local definitionsDocumentation and user's manualTable of contentsOCaml programs