[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
|
||||
substring
|
||||
void
|
||||
format
|
||||
integer
|
||||
(rename-out [honu-cond cond]
|
||||
[null empty]
|
||||
[current-inexact-milliseconds currentMilliseconds]
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user