Question: 3. Write a Haskell function triples of type [ (a, b)] -> [(a, b, a)] that takes a list of pairs, and returns a list

 3. Write a Haskell function triples of type [ (a, b)]

3. Write a Haskell function triples of type [ (a, b)] -> [(a, b, a)] that takes a list of pairs, and returns a list of triplets, formed by repeating the first element of the pair.. For example, the expression firsts (1, False), True)] would evaluate to [(, False, 1), (2, True, 2), (3, True, 3). Turn in a listing of your function, and the results of this test case. (2, True, (3

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!