Anonymous user
Conditional structures: Difference between revisions
m
→Conditional functions
(Add Maple example) |
|||
Line 1,995:
=== Conditional functions ===
The Maple function <code>`if`(cond,a,b)</code> (note the backtick <code>`</code> delimiters) returns ''a'' when ''cond'' is true and ''b'' otherwise.
<code>res := `if`(n::even, n/2, 3*n+1);</code>
|