Functional Programming & Proofs
Revision (1)
Only few keywords to master: fun
, let/rec/match
and type
.
Sample application
- How to define a
Name
or an Age
with a type
synonym ?
- How to define a
Person
having a Name and an Age with a type
definition ?
- How to define a
birthday
function (using let
and match
) ?
- How to define a
Group
that can be either Empty or the Add of a Person to another group ?
- How to define an "happy new year" function that makes birthday of all the persons in a group ?
- How to generalize the concept of a group of person to a
Collection
of As (by using a generic) ?
- How to apply a function to all the element of a collection ? Then, how to make an "happy new year".
- How to transform a collection into a
List
? Then, how to make an "happy new year".
answer
Go further
- By changing ages to marks, how to get persons having a mark upper or lower to 10 ? (see
filter
function)
- How to get the means of the marks ? See
fold/reduce
function and map-reduce technology.
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide