Could you resolve this problem Write a oneline Haskell funct

Could you resolve this problem?

Write a one-line Haskell function

between :: Int -> Int -> Int -> Bool

such that between m y z returns True exactly when m is (strictly) between y and z (i.e., y is less than m and m is less than z); the function should return False in all other cases. For example, between 10 3 15 should return True, but between 3 7 6, between 8 5 7, and between 10 10 15 should all return False.

Solution

maxThreeCount a b c

= (maxbool)

    where

    max   = maxThree a b c

    maxbool = if a>b && b<c then true

            else false

Could you resolve this problem? Write a one-line Haskell function between :: Int -> Int -> Int -> Bool such that between m y z returns True exactly whe

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site