This question already has an answer here:

This is a follow-up to this question. Consider:

f = #^2&
g = #^3&

Compose[f, g]
(#1^3 &)^2

Am I the only one to think this is a bug?


marked as duplicate by mikado, happy fish, Kuba Apr 7 '17 at 20:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 4
    $\begingroup$ Note that Compose[f, g] does return f[g], and that Compose[] has been obsolete for quite a while... $\endgroup$ – J. M. will be back soon Apr 7 '17 at 3:28
  • 4
    $\begingroup$ Composition[f, g][x] evaluates to x^6 $\endgroup$ – Bob Hanlon Apr 7 '17 at 6:43
  • $\begingroup$ While that question is different, the answer explains the difference. We could close it as a duplicate then instead of as a simple mistake. Is there a name for #1@#2&? Let me know. $\endgroup$ – Kuba Apr 7 '17 at 20:04
  • $\begingroup$ @Kuba Yes, that is very relevant. I have no strong opinion on duplicate vs not, so leave it to you. $\endgroup$ – Igor Rivin Apr 7 '17 at 20:07
  • $\begingroup$ @IgorRivin thanks. Duplicates are never deleted while simple mistakes can be, unless they have a positive score. $\endgroup$ – Kuba Apr 7 '17 at 20:11