Typed Lambda Calculi and Applications