Exercise 3 - Operations over functionsExercisesExercise 1 - LogarithmsExercise 2 - An accumulatorDocumentation and user's manualTable of contentsOCaml programs

Exercise 2 - An accumulator

Consider  accumul_right .

 1 
  Write a recursive definition of  accumul_right_1  (i.e., a phrase that begins with  let rec accumul_right_1 , not with  let accumul_right_1 ) that binds this name to the same value as that bounded to  accumul_right .

 2 
 Use  string  values to represent strings and  accumul_right  to write a functional value that computes the concatenation of all the strings in a list.

 3 
  Use the higher-order functions  compose  and  accumul_right  to write the functional value that computes the composition of all the functions in a list. Name this value as  compose_functions .

Write applications of  compose_functions .

Write applications of results of applications of  compose_functions .


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

Exercise 3 - Operations over functionsExercisesExercise 1 - LogarithmsExercise 2 - An accumulatorDocumentation and user's manualTable of contentsOCaml programs