Help with Lisp type system



Given +foo+ and +bar+ (2 constants, value not really important here),
I'd like to make an unsigned-byte 8 sequence containing these two
values. The brute force way:

(let ((blob (make-array 2 :element-type '(unsigned-byte 8))))
(setf (aref blob 0) +foo+)
(setf (aref blob 1) +bar+)
blob))

But surely I ought to be able to use :initial-contents to populate the
array. I just haven't been able to find the right incantation that
makes everyone happy.

Any help appreciated.
.



Relevant Pages

  • Re: Help with Lisp type system
    ... I'd like to make an unsigned-byte 8 sequence containing these two ... The brute force way: ... But surely I ought to be able to use:initial-contents to populate the ...
    (comp.lang.lisp)
  • Re: Help with Lisp type system
    ... I'd like to make an unsigned-byte 8 sequence containing these two ... The brute force way: ...
    (comp.lang.lisp)
  • Re: Help with Lisp type system
    ...  The brute force way: ...     blob)) ... But surely I ought to be able to use:initial-contents to populate the ...
    (comp.lang.lisp)
  • Re: Help with Lisp type system
    ... I'd like to make an unsigned-byte 8 sequence containing these two ...  The brute force way: ...     blob)) ...
    (comp.lang.lisp)
  • Re: Whats the opposite of "The Microwave"?
    ...  Point forward, ala Odom and Walton, ought to ... The one sequence where he brought the ball up out of the backcourt had me on ...
    (alt.sports.basketball.nba.la-lakers)