Advanced Functional Prog.
Packages' Builder
The objective of the present work is to define an algorithm that groups products
into packages whose total weight is inferior to a limit wmax
; this, to minimize transportation.
A. Preliminary questions
- What will be the result of
iter (0,[]) (fun (x,xs)->(x+1,x::xs)) 10
with the following function ?
let rec iter state transition = function
| 0 -> state
| n -> transition (iter state transition (n-1));;
- What is the standard name of the preceding function ?
- By using the previous example, propose an operator that computes an interval,
ie. min<>max=[min;min+1;...;max]
.
answers
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