Answered step by step
Verified Expert Solution
Question
1 Approved Answer
f# question: What is the type inferred for the following function? let estimate Ages(familyName, year 1. year 2, year3) SEP let calculateAge yearOfBirth SP let
f# question:
What is the type inferred for the following function? let estimate Ages(familyName, year 1. year 2, year3) SEP let calculateAge yearOfBirth SP let year = System.DateTime.Now.Year's year-yearOfBirthise let estimatedAge 1 = calculate Age year 1.se let estimatedAge2 = calculateAge year 23 let estimatedAge 3 = calculate Age year 3: let average Age = (estimated Age 1 + estimatedAge2 + estimatedAge3)/35P sprintf "Average age for family %s is %d" familyName average Ages val estimate Ages: familyName:string year 1:int *year2:int year3:int -> float valit: familyName:string * year 1:int year2:int*year 3:int-> string val estimate Ages: familyName:string * year 1:int * year2:int year3.int->int val estimate Ages: familyName:string * year 1:int *year2:int *year 3:int -> string val estimate Ages: familyName:string -> year 1:int ->year2:int ->year 3:int-> string
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started