A note on the Beer-Lambert law