concatr ::Integer -> [[Integer]] -> [[Integer]]
concatr x (y) = [x] : y
concatr x (y:ys) = concatr x y: concatr x ys
I have tried so many combinations of this that my head is starting to hurt. What exactly am i doing wrong? I just want an integer to be put in every sublist of a list passed in.
You can use the
mapfunction.Eta reduce for a terse solution: