What is the purpose of the map() method in a stream pipeline?
a) To remove elements from the stream
b) To transform each element of the stream into a new element
c) To combine elements of the stream into a single element
d) To terminate the stream and return a single result