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)] -> [(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
Get step-by-step solutions from verified subject matter experts
