Parameter conditions
- To: mathgroup at smc.vnet.net
- Subject: [mg88656] Parameter conditions
- From: Steven Siew <siewsk at bp.com>
- Date: Sun, 11 May 2008 15:16:13 -0400 (EDT)
I'm just curious why the simple code below is not working. Why is happy[4] not returning the number 200 In[1]:= happy[p_?PrimeQ] = 100; happy[p_?Not[PrimeQ]] = 200; In[3]:= Inhappy[4] Out[3]:= happy[4] In[4]:= happy[5] Out[4]:= 100
- Follow-Ups:
- Re: Parameter conditions
- From: "W_Craig Carter" <ccarter@mit.edu>
- Re: Parameter conditions