newton 21> maple |\^/| Maple V Release 3 (University of Texas - Austin) ._|\| |/|_. Copyright (c) 1981-1994 by Waterloo Maple Software and the \ MAPLE / University of Waterloo. All rights reserved. Maple and Maple V <____ ____> are registered trademarks of Waterloo Maple Software. | Type ? for help. > read example; 23 aa := --- 155 myadd := proc(x:numeric,y:numeric) x+y end > myadd(3,4); 7 > myadd(a,b); Error, myadd expects its 1st argument, x, to be of type numeric, but received a > #------------------------------------------------------------ > read ladd; > op(ladd); proc(l:list(numeric)) local lsum,i; if nops(l) = 0 then ERROR(`argument is the NULL list`) fi; lsum := l[1]; for i from 2 to nops(l) do lsum := lsum+l[i] od; lsum end > ladd( [1,2,3,4] ); 10 > ladd( [a,b,c] ); Error, ladd expects its 1st argument, l, to be of type list(numeric), but received [a, b, c] > ladd([]); Error, (in ladd) argument is the NULL list > ladd([1]); 1 > ladd(1); Error, ladd expects its 1st argument, l, to be of type list(numeric), but received 1 > quit bytes used=136888, alloc=131048, time=0.04