English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What does mental yoga mean in the following sentence?

The isNaN() function requires some mental yoga at times because it attempts to prove a negative—that the value in a variable is not a number.

share|improve this question
Consider that the answer needs some mental yoga on the OP's part, that is, to exercise the brain. – Kris Dec 27 '11 at 6:52
up vote 2 down vote accepted

Yoga here is being used as a metaphor for flexibility.

Because the function attempts to do what's widely considered impossible -- proving a negative -- it demands that you stretch your mind a bit to comprehend it.

In addition to mental yoga, you might run into the phrase mental gymnastics, which has largely the same meaning.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.