• Write a generalized fast-expt run in linear iterative way.
    That is, the operation and the unit element of that operation are the arguments.
  • Refer to exercise 1.16, 1.17 and section 1.3 in the textbook.
  • Deadline: 2010 Apr 7 00:05am
  • Put your file(s) under ~/scheme-982/exer5
  • for example:
    $ scheme48
    Welcome to Scheme 48 1.8 (made by klim on Tue Feb 17 11:32:15 CST 2009)
    Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees.
    Please report bugs to scheme-48-bugs@s48.org.
    Get more information at http://www.s48.org/.
    Type ,? (comma question-mark) for help.
    > ,load exer5.scm
    > (fast 2 * 10 1)
    1024
    > (fast 5 + 10 0)
    50
    > ,exit
    $