I need to define a function with default arguments.

I came up with something like

fn(x,[a]):= /* multiply x by a */ /* default value of a: 1 */ block( if emptyp(a) then a: 1 else a:a[1], a*x )$ fn(1); fn(1,1); fn(1,2); (%o31) 1 (%o32) 1 (%o33) 2

What is the right way to define such functions?

Wolfgang