fixnum.rkt (430B)
1 #lang typed/racket 2 (require "typed-untyped.rkt") 3 (define-typed/untyped-modules #:no-test 4 (provide fxxor fxxor2) 5 6 ;; For fxxor, used to compute hashes. 7 ;; The type obtained just by writing (require racket/fixnum) is wrong, so we 8 ;; get a more precise one. 9 (require/typed racket/fixnum [(fxxor fxxor2) (→ Fixnum Fixnum Fixnum)]) 10 11 (: fxxor (→ Fixnum * Fixnum)) 12 (define (fxxor . args) 13 (foldl fxxor2 0 args)))