Question

Code in Haskell: A function that prints a “Less” or “Greater” depending on whether a given...

Code in Haskell:

  1. A function that prints a “Less” or “Greater” depending on whether a given number passed to the function is less than or equal to 50 or greater than 50
0 0
Add a comment Improve this question Transcribed image text
Answer #1



Please indent the code according to the screenshot.
Comment below for any modifications or queries. thanks

Code Screenshot

main.hs saved 1 myScore x = GHCi, version 8.6.5 Less if x >=50 then Greater else Less 7 main = do 9 print(myScore 5)

Executable Code:

myScore x =
if x >=50 then "Greater"
else "Less"
main = do
print(myScore 5)

Add a comment
Know the answer?
Add Answer to:
Code in Haskell: A function that prints a “Less” or “Greater” depending on whether a given...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT