Re: Function for complex polynomial with variable number of arguments
- To: mathgroup at smc.vnet.net
- Subject: [mg123507] Re: Function for complex polynomial with variable number of arguments
- From: Simon <simonjtyler at gmail.com>
- Date: Fri, 9 Dec 2011 05:57:08 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jbq33b$ica$1@smc.vnet.net>
- Reply-to: comp.soft-sys.math.mathematica at googlegroups.com
You could just add a Default for the pattern p__, i.e. poly[z_, p__: 0] := Product[z - {p}[[i]], {i, Max[1, Length[{p}]]}]