You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
418 B
Racket
16 lines
418 B
Racket
#lang racket/base
|
|
(provide (all-defined-out))
|
|
|
|
#|
|
|
approximates
|
|
https://github.com/mbutterick/restructure/blob/master/src/Array.coffee
|
|
|#
|
|
|
|
|
|
|
|
(test-module
|
|
(check-equal? (decode (+Array uint16be 3) #"ABCDEF") '(16706 17220 17734))
|
|
(check-equal? (encode (+Array uint16be 3) '(16706 17220 17734) #f) #"ABCDEF")
|
|
(check-equal? (size (+Array uint16be) '(1 2 3)) 6)
|
|
(check-equal? (size (+Array doublebe) '(1 2 3 4 5)) 40))
|