I have been met with the following problem:
I have defined the following:
myFunc[e_Integer];
That means, if I call:
myFunc[0]
The output of the program is going to be simply:
myFunc[0]
Now, I would like to do the following:
If e > 0
, do something. If e <= 0
, output myFunc[0]
, just like in the previous example. How would I go about doing this?
I was thinking about something like this, but I have no idea what to put in the last argument of the If function.
myFunc[e_Integer] := If[e>0, e*e , (* ? *) ];
Any responses would be greatly welcome.