diff --git a/collects/honu/main.rkt b/collects/honu/main.rkt index 0251e03a6a..16bb004d00 100644 --- a/collects/honu/main.rkt +++ b/collects/honu/main.rkt @@ -24,6 +24,8 @@ length substring void + format + integer (rename-out [honu-cond cond] [null empty] [current-inexact-milliseconds currentMilliseconds] diff --git a/collects/honu/private/common.rkt b/collects/honu/private/common.rkt index 4d95647a0c..8861e047f6 100644 --- a/collects/honu/private/common.rkt +++ b/collects/honu/private/common.rkt @@ -10,6 +10,11 @@ (provide sqr) (define (sqr x) (* x x)) +;; convert a float to an integer +(provide integer) +(define (integer x) + (inexact->exact (round x))) + (provide honu-cond) (define-honu-syntax honu-cond (lambda (code context)