Question: HASKELL LANGUAGE 9 pts) Explain list comprehension based on your reading of http:/leamyouahaskell.com/starting- 21 pts) Explain what each of the following lines of code is

 HASKELL LANGUAGE 9 pts) Explain list comprehension based on your reading

HASKELL LANGUAGE

9 pts) Explain list comprehension based on your reading of http:/leamyouahaskell.com/starting- 21 pts) Explain what each of the following lines of code is doing. Record the result. [x+ "ay"| x-[chicken", "soup", "pillow, "music"]] [if even x then "Hello" else "Goodbye" l x -[0.201] Coding Create each fmction in the table. You may use built in fiunctions that you find in Leam You a Haskell. Each function is worth 10 points. Number Desc Takes a list of integers and returns a list of integers where all values have had one added to them. Takes a float and returm a char representing the letter grade based on a standard scale (A if score>90, etc.) Takes a list of floats and returns a list of chars that represent the letter grades based off the original scores Takes a list of floats representing ounces, returns a list of floats where the ounce values have been converted to cup values (1 ounce = 0.125 ame addOne rawGradeToLetter convertRawsToLetters ouncesToCups Takes a list of floats representing ounces of water consumed, returns a list of floats represent the number of glasses of water consumed glassOfWater = 8 ounces) hydrated Takes a float representing the number of ounces of water consumed, converts it glasses of water, if glasses of water is greater than 8 return the string "Hydrated" else return Not Takes a float representing the number of ounces of water consumed, converts it to glasses of water, returns the number of glasses that need to be consumed (as a float) to be considered hydrated (8 ted" waterNeeded sses

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!