Question: Haskell Code please solve ASAP 1. Define a function max3 :: Int -> Int -> Int -> (Int, Int, Int) that orders the three inputs,

Haskell Code please solve ASAP

Haskell Code please solve ASAP 1. Define a function max3 :: Int

1. Define a function max3 :: Int -> Int -> Int -> (Int, Int, Int) that orders the three inputs, e.g., max3 2 1 4(1,2,4) and max3 5 1 3(1,3,5) 2. Write a function iss?rted using recursion and pattern matching that checks whether a given 1ist of integers is sorted, e.g. isSorted [1,2,3,3,5,6] - True and isSorted [1,2,4,3,5,6]-False 3. A triple (x,y, z) of positive integers is called pythagorenan if x^2 + y^2-z"2. Using list comprehension, define a function pyths :: Int-> (Int, Int, Int)] that returns the list of all pythagorenian triples whose components are less or equal the given limit, e.g., pyths 10[ (3,4,5), (4,3,5), (6, 8,10), (8,6,10)] 4. Write a function sqrAlll : [Int] -> [Int] that squares al1 numbers in a list using list comprehension, e.g., sqrAll1 5. Use list comprehension in order to define a function addPairs :: [Int] -> [Int] -> [Int] that addPairs 11 12 contains all sums of the even elements from 11 and the odd elements from 12 Examples: addPairs [1..4] [1..4[3,5,5,7] addPairs [2, 5, 8] [5, 1,2] [7, 3, 13, 9]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!