From Frege to chatGPT: Compositionality in language, cognition, and deep neural networks