4-2-1e
Fact { 0 = 1; sN = <MUL (sN) <Fact <SUB (sN) 1>>>; } Fact { 0 = 1; sN = <Int (sN)'*'Fact((sN)'-'1)>; } Int { sN = sN; eX '+' eY = <ADD (<Int eX>) <Int eY>>; eX '-' eY '-' eZ = <Int (eX '-' eY) '-' eZ>; eX '-' eY = <SUB (<Int eX>) <Int eY>>; eX '*' eY = <MUL (<Int eX>) <Int eY>>; (eX) = <Int eX>; sF (eX) = <Apply sF <Int eX>>; } Apply { Fact eN = <Fact eN>; } |