That last part is not a parameter to foldr, but rather a function composition....
Let's break this apart:
lightadded :: Colour
lightadded = (foldr (zipWith (+)) black . map effectivelight) lightsvisible
The output of this is a Colour, and
foldr (zipWith (+)) black . map effectivelight
is therefore a function that takes lightsvisible
as an input, and outputs a Colour.
Since infix operators bind more closely than anything else, this is actually two functions composed together (ie- . map effectivelight
is not a parameter to the foldr)
foldr (zipWith (+)) black
and
map effectivelight
Notice that map effectivelight
takes a list as input and gives one as output. lightvisible
is an array, map effectivelight
modifies each element in the list using effectivelight
, and the result of this is actually the third parameter into the foldr.