Help1:=proc() : print(` W(n) `): end: #W(n): inputs a pos. integer n, and outputs the set all sequences #of length n in -1,1 W:=proc(n) local i,S,s: option remember: if n<0 then RETURN({}): fi: if n=0 then RETURN({[]}): fi: S:=W(n-1): { seq( [ op(s) ,-1] , s in S), seq([op(s),1], s in S)} : end: