Advanced Functional Prog.


Introduction

Note. F# has an interactive interpreter illustrated below:

dotnet fsi
#load "intro.fsx";;
val list: int list
val func: list: int list -> int list
#help;;
#time "on";;
func list;;
#quit;;

Question: do you understand the "datatypes" inferred ?


Exercices.

  1. What will be print by this program ? Does F# is only a functional programming language ?
  2. How to both compute the count of rule 2 and the result (see tuples) ?
    answer

3 - 9