Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Haskell programing ( GHC 8.8.2 ) Define a function that has the following type:(Ord a, Show a) => a -> a -> String,meaning that it
Haskell programing ( GHC 8.8.2 )
Define a function that has the following type:(Ord a, Show a) => a -> a -> String,meaning that
it receives two inputs of any type where that type is a member of type class Ord and a member of type class show
it returns a string
-------
I already did like this:
func x y = if x == y then show x else show y
But I am not sure it right or not, because the instruction said "it receives two inputs of any type"
for my function, it accepts only interger
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