How does William James’s new Functionalist approach to psychology borrow from Darwin’s evolutionary theory?

How does William James’s new Functionalist approach to psychology borrow from Darwin’s evolutionary theory?
Your response to this short article:
https://www.nature.com/articles/d41586-018-05313-8
PDF version of the article is attached in the uploaded files section