Hello I have a function foo (Int -> Int -> Int) in haskell and I want to map each element of a list [1..y] to a value x which I would usually do like this:
map (foo x) [1..y]
the problem is my function is not commutative so what I actually want to do is something like this (careful incorrect syntax ahead):
map (foo [1..y]) x
So basically I want to pass my function each element of a list and map each element to x but the values [1..y] need to be on the left side of the function. Note that foo takes two Ints as arguments. I am sure haskell has some trick in its repository for this, can you help me out :) ?