Task description below. In my opinion, only process1 is suitable, but this answer is incorrect. What other features are suitable?
Below are the implementations of the process :: (b -> d) -> [(a, b, c)] -> [d] function, which takes a handler function as the first argument, and a list of triples as the second. The process function should apply a handler to the middle element of every third triple from the list, counting from its head. Return this function should a list of processing results, for example
GHCi> process (^ 2) [(1,1,1), (1,2,1), (1,3,1), (1,4,1), (1,5,1), (1 , 6,1), (1,7,1)] [9,36] Select those versions of the implementation of the process function that actually do this work on any lists.
process0 f [] = [] process0 f [t1] = [] process0 f (t1: t2: (x, y, z): ts) = fy: process0 f ts process1 f [] = [] process1 f (t: []) = [] process1 f (t1: t2: []) = [] process1 f (t1: t2: (x, y, z): ts) = fy: process1 f ts process2 f [] = [] process2 f (t1: t2: (x, y, z): ts) = fy: process2 f ts process2 f [t] = [] process2 f [t1, t2] = [] process3 f [t] = [] process3 f (t1: t2: (x, y, z): ts) = fy: process3 f ts process3 f (t1: t2: ts) = [] process3 f [] = [] process4 f (t1: t2: (x, y, z): ts) = fy: process4 f ts process4 f ts = []