scsh-0.6/ps-compiler/prescheme/test/poly.scm

12 lines
260 B
Scheme
Raw Permalink Normal View History

1999-09-14 08:45:02 -04:00
; Copyright (c) 1994 by Richard Kelsey. See file COPYING.
(define (identity x) x) ; can't get much more polymorphic than that
(define (test x)
(cond (#f
(vector-ref (identity (make-vector 3)) 2))
(else
(+ (identity (+ x 3)) (identity (+ x 2))))))