Hi, I have the following tuple:
ordena :: Ord a => (a,a,a) -> (a,a,a)
Let's see this is not very complicated but as I do it I get a very ugly and long code.
In this case I ask to see if there is some type of recursion that I can do to order it from smallest to largest
Without using any modules (as I assume is desired), a straightforward and simple solution would be:
You can convert the tuple to a list, sort the list, and return the tuple: