G'day guys,
Trying currently to finish up a bit of homework I'm working on, and having an issue where I'm trying to apply map across a function that accepts multiple inputs.
so in the case I'm using processList f (x:xs) = map accelerateList f xs x xs
processList is given a floating value (f) and a List that it sorts into another List
Accelerate List takes a floating value (f) a List and a List Object through which it returns another List Object
I know my Accelerate List code is correct, but I cannot for the life of me get the syntax for this code working:
processList :: Float -> [Object] -> [Object]
accelerate f [] = []
accelerate f [x] = [(accelerateForce f x x)]
accelerate f (x:xs) = map accelerateList f xs x xs
Any ideas? I've been scratching my head for about 3 hours now. I know it's something really simple.