I have recently started self learning lambda calculus. One thing i am unable to visualize is how this language can be used to build practical applications. One simple use case i could think of is the following : Assume we have records of test scores of multiple students in a class. Like
name = John, math=30, science = 40 , english = 60
name = Jane, math=22, science = 80, english = 45
name = Mark, math=77, science = 43, english = 83
How can we write a program in lambda calculus (untyped or simply typed) that computes the average of test scores for each student.Please note that my question is not about the parsing of above text, but about the actual core computation .
Expected output:
name = John, average = 43
name = Jane, average = 49
name = Mark, average = 68
Can you please kindly share how this simple computation can be implemented using lambda calculus?
Even though i only have little knowledge of Haskell, I am not looking for haskell implementations, but i am curios about how this would be done in lambda-calculus itself.
Best Regards.