Question: Create 4-tuples for the elements in the given 4 lists, Write a function that prints the sum of the first two elements of a
Create 4-tuples for the elements in the given 4 lists, Write a function that prints the sum of the first two elements of a tuple equal to the sum of the last two (Do not use head-tail, where, if-else statements.) (The code will be written in Haskell) Example: function_name xa xb xc xd function_name [1,6] [3,7] [2,5] [4,8] For lists [1,6] [3.7] [2,5] [4,8], the 4-tuples are as follows: [(1,3,2,4),(1,3,2,8), (1,3,5,4), (1,3,5,8),(1,7,2,4),(1,7,2.8),(1,7,5,4),(1,7,5,8),(6,3,2,4) ,(6,3,2,8),(6,3,5,4),(6,3,5,8),(6,7,2,4),(6,7, 2,8),(6,7,5,4),(6,7,5,8)] Output = [(6,3,5,4), (6,7,5,8)]
Step by Step Solution
There are 3 Steps involved in it
To solve this problem were going to write a Haskel... View full answer
Get step-by-step solutions from verified subject matter experts
