[honu] add format and a facility to convert floats to integers
This commit is contained in:
parent
9d393f991f
commit
9ec39fd590
|
@ -24,6 +24,8 @@
|
||||||
length
|
length
|
||||||
substring
|
substring
|
||||||
void
|
void
|
||||||
|
format
|
||||||
|
integer
|
||||||
(rename-out [honu-cond cond]
|
(rename-out [honu-cond cond]
|
||||||
[null empty]
|
[null empty]
|
||||||
[current-inexact-milliseconds currentMilliseconds]
|
[current-inexact-milliseconds currentMilliseconds]
|
||||||
|
|
|
@ -10,6 +10,11 @@
|
||||||
(provide sqr)
|
(provide sqr)
|
||||||
(define (sqr x) (* x x))
|
(define (sqr x) (* x x))
|
||||||
|
|
||||||
|
;; convert a float to an integer
|
||||||
|
(provide integer)
|
||||||
|
(define (integer x)
|
||||||
|
(inexact->exact (round x)))
|
||||||
|
|
||||||
(provide honu-cond)
|
(provide honu-cond)
|
||||||
(define-honu-syntax honu-cond
|
(define-honu-syntax honu-cond
|
||||||
(lambda (code context)
|
(lambda (code context)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user