Using a map with a function
I have 2 functions
accelerate :: Float -> [Particle] -> [Particle]
accelerateParticle :: Float -> Particle -> [Particle] -> Particle
and what I am trying to achieve is for each item in [Particle]
a function is applied accelerateParticle
. The problem I am facing is that the function is accelerateParticle
based on using the original [Particle]
, which is set with acceleration. I was thinking about using a card like this.
map (\particle -> accelerateParticle Float particle [Particle]) [Particle]
but I'm not really sure if this is the correct format.
+3
source to share