Advanced Functional Prog.
back - up - next
Course 4 - Summary
- Only 7 keywords:
fun
, let_rec
, match_with
, type_of
Sample stack function:
let rec upStack s =
match s with
| NewStack -> NewStack
| Push (v,s') -> Push (v+1,upStack s');;
upStack s;;
Generalization (map
):
let rec mapStack f s =
match s with
| NewStack -> NewStack
| Push (v,s') -> Push (f v,mapStack f s');;
mapStack ((+) 1) s;;
5
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