%mathpiper,def="FW"

/* FW: pass FW the result of Factors, and it will show it in the
 * form of p0^n0*p1^n1*...
 */


5  # FW(_list)_(Length(list) = 0) <-- 1;
10 # FW(_list)_(Length(list) = 1) <-- FWatom(list[1]);
20 # FW(_list) <--
[
  Local(result);
  result:=FWatom(First(list));
  ForEach(item,Rest(list))
  [
   result := ListToFunction({ ToAtom("*"),result,FWatom(item)});
  ];
  result;
];

%/mathpiper
