Worms do calculus?

Thanks to Julie for passing along this great example of calculus in nature. Apparently, roundworms calculate how much the strength of different tastes is changing and stay the course or change paths depending on their calculations.