1 \ ============================== 3.6 =========================================
3 \ Given: How do you get:
5 : ass36.1.1 1 2 3 rot rot swap .s 2drop drop ;
8 : ass36.1.2 1 2 3 over .s 2drop 2drop ;
11 : ass36.1.3 1 2 3 dup .s 2drop 2drop ;
14 : ass36.1.4 1 2 3 swap drop dup .s 2drop drop ;
17 : ass36.1.5 1 2 3 rot swap .s 2drop drop ;
20 : ass36.1.6 1 2 3 4 swap 2swap swap ;
29 \ Assignment: Write 17^3 and 17^4 in Forth, without writing 17 more than once.
30 \ Write a piece of Forth code that expects two numbers on the stack (a and b,
31 \ with b on top) and computes (a-b)(a+1).
33 : ass36.2 17 dup dup * * ;
34 : ass36.3 17 dup 2dup * * * ;
35 : ass36.4 ( a b -- erg)
36 over swap - swap 1 + * ;