I need to read N bytes from a stream and return the result as a list. Currently I'm using: (rev (accum a
(repeat n
(a (readb stream))))
but it seems like there ought to be a shorter / more elegant way of doing this. Can you help?If you offer code suggestions, please let me know if it will run in arc2 or needs Anarki. Thanks! |