On 01/12/2017 11:32 PM, Lehi Toskin wrote:
> `number->bytes`, is a function I made; its definition is
> (define (number->bytes num)
>   (define hex (number->string num 16))
>   ; from file/sha1
>   (hex-string->bytes (if (even? (string-length hex)) hex (string-append "0" 
> hex))))

You might be able to use Racket's built-in `integer->integer-bytes`
here:
http://docs.racket-lang.org/reference/generic-numbers.html?q=integer%20bytes#%28def._%28%28quote._~23~25kernel%29._integer-~3einteger-bytes%29%29

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to