Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Programming Paradigms Haskell . Question 2 of 2: Rank Numbers: [50 marks] Write a function along with helper functions as needed, that takes three separate
Programming Paradigms
Haskell .
Question 2 of 2: Rank Numbers: [50 marks] Write a function along with helper functions as needed, that takes three separate numbers as parameters and returns a list with the elements sorted in ascending order.
Your function declaration would be of the form: rankNumbers :: Int -> Int -> Int -> [Int]
Please properly comment your code before submission.
Sample Test cases:
Test case 1:
rankNumbers 14 12 2 Output: [2, 12, 14]
Test case 2:
rankNumbers 4 12 2 Output: [2, 4, 12]
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