Is there a nicer way to write the following function fs' with functors or applicatives?
fncnB = (* 2)
fncnA = (* 3)
fs' fs = zip (map (fncnA . fst) fs) $ map (fncnB . snd) fs
I see from this question that I could rely on the functor instance of lists to map a single function acting over both elements of each tuple, or e.g. on the applicative instance of tuples to apply functions to just the second-half of a two-tuple, but I'm curious how functors and applicatives fit into the picture of operating over lists of multi-component data types.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)