instance functorFree :: (Functor f) => Functor (Free f) where map :: forall a b. (a -> b) -> (Free f a) -> (Free f b) map fn (Free f) = Free (map fn <$> f) map fn (Pure a) = Pure (fn a)instance applicativeFree :: (Functor f) => Applicative (Free f) where pure = Pureinstance bindFree :: (Functor f) => Bind (Free f) where bind :: forall a b. Free f a -> (a -> Free f b) -> Free f b bind (Free f) fn = Free $ (\a -> bind a fn) <$> f bind (Pure a) fn = fn a