I am trying to create map using another function that I have been supplied with can anyone help so
I have created:
ConcatListsOnFunc :: (a -> [b]) -> [a] -> [b]
ConcatListsOnFuncf [] = []
ConcatListsOnFunc func (y:ys) = func y ++ flattenMap func ys
and i was wondering how i can use that function above to implement the higher order function map
which is of type
myMap :: (a -> b) -> [a] -> [b]
from myMap with input (+1) [1,2,3] should give output [2,3,4]
can anyone help is there a way to create myMap using my previously defined function with a lambda function?