;;; $Id: list-length-mod.scm,v 1.2 2006/01/05 22:24:09 leavens Exp $ ;;; AUTHOR: Brian Dorn and Gary T. Leavens (module list-length-mod (lib "typedscm.ss" "typedscm") (provide list-length) (deftype list-length (forall (t) (-> ((list-of t)) number))) (define list-length (lambda (l) ;; ENSURES: Result is the length of l (if (null? l) 0 (+ 1 (list-length (cdr l)))))) ) ;; end module