Question: What is the type inferred for the following function? let year let estimate Ages(familyName, year, year2, year3) let calculate Age yearOfBirth - System.DateTime.Now. Year year
What is the type inferred for the following function? let year let estimate Ages(familyName, year, year2, year3) let calculate Age yearOfBirth - System.DateTime.Now. Year year yearOfBirth let estimatedAgel - calculateAge year1 let estimatedAge2 - calculateAge year2 let estimatedAge3 calculateAge year3 let averageAge - (estimatedAgel + estimatedAge2 - est imatedAge3) / 3 sprintf "Average age for family %s is Xd" familyName averageAge Oval estimate Ages: familyName:string 'yeari:int year2:int year3 int -> float val estimateAges: familyName:string ->yeari:int -> year2:int-> year 3:ant -> string valit: familyName string year 1:int year2:int year3:int -> string val estimate Ages: familyName string ' year 1:int year2:int" year3 int -> string val estimate Ages: familyName string 'year int" year2:int year 3:int -> int
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
