plot question



I define a function
f(x):= if x<1/2 then x else (1-x);
This works. But, if I try to plot f, then Maxima is unable to evaluate 
the predicate. Is there a way to submit this function to plot2d 
successfully?
This does work in commercial Macsyma.
Thanks,
Dick Fell