Question: Programming in Haskell 1. Dene a function fmap2 with its type, which can fmap any function through two layers of a Functor f. Specialized to
Programming in Haskell
1. Dene a function fmap2 with its type, which can fmap any function through two layers of a Functor f. Specialized to lists, this will be equivalent to the map2 function in Basics.hs, and also to mapTree2.
module Practice3 where
import Data.Tree
fmap2 :: Functor f => (a -> b) -> f (f a) -> f (f b)
fmap2 = undefined
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
