Advanced Functional Prog.
Exercises
- The concept of "isomorphism" means that two datatypes represent a "same" information. An isomorphism is defined by an invertible transformation/function. For instance, The functions
(int,char)
define isomorphism between int
eger and char
acters.
- What will be the value of
char (int 'a')
?
- How to test if a letter corresponds to a digit '0','1',...'9' ?
- How to get the numerical value of a digit ?
- Find how to define an isomorphism between
string
and char list
.
- How to count 'a' in a string ?
- How to get count of all letters in a string ?
- How to "(de)crypt" letters from a string ?
- How to represent a clock hour:minutes in
F#
? Can you propose an isomorphic datatype ?
- How to model a log history ?
- How to get the hour with the maximum activity ?
['a;'b'] |> List.map string | List.reduce (+)
9 - 9
advanced functional programming programmation fonctionnelle avancée dr mulhouse ensisa france thiry laurent uha fun fsharp
advanced functional programming programmation fonctionnelle avancée dr mulhouse ensisa france thiry laurent uha fun fsharp
advanced functional programming programmation fonctionnelle avancée dr mulhouse ensisa france thiry laurent uha fun fsharp
advanced functional programming programmation fonctionnelle avancée dr mulhouse ensisa france thiry laurent uha fun fsharp
advanced functional programming programmation fonctionnelle avancée dr mulhouse ensisa france thiry laurent uha fun fsharp
advanced functional programming programmation fonctionnelle avancée dr mulhouse ensisa france thiry laurent uha fun fsharp
advanced functional programming programmation fonctionnelle avancée dr mulhouse ensisa france thiry laurent uha fun fsharp
advanced functional programming programmation fonctionnelle avancée dr mulhouse ensisa france thiry laurent uha fun fsharp
advanced functional programming programmation fonctionnelle avancée dr mulhouse ensisa france thiry laurent uha fun fsharp
advanced functional programming programmation fonctionnelle avancée dr mulhouse ensisa france thiry laurent uha fun fsharp
advanced functional programming programmation fonctionnelle avancée dr mulhouse ensisa france thiry laurent uha fun fsharp