File: poly.scm

package info (click to toggle)
scheme48 1.8%2Bdfsg-1%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 14,984 kB
file content (11 lines) | stat: -rw-r--r-- 265 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
; Copyright (c) 1993-2008 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))))))