Problem
I have a vector a of size N containing sample data, and another vector b of size M (N> M) containing indices. I would like to get a vector c of size N containing filtered elements from a based on the indices in b .
Question
Is it possible to implement the desired function without using list comprehensions, just basic functions of a higher order, such as map, zipWith, filter, etc. (more precisely, their equivalents are mapV, zipWithV, filterV, etc.)
Prerequisites:
I use the Haskell Embedded Domain Specific Language ( ForSyDe , ForSyDe.Shallow.Vector module ), limited by a set of hardware synthesized functions. To respect the design methodology, I am allowed to use only the provided functions (thus, I cannot use list methods, etc.).
source
share