     [ <struct> ] [ struct-slots ] bi 
     [ [ (writer-quot) call( value struct -- ) ] with 2each ] curry keep ;
 
+M: struct-class initial-value* <struct> ; inline
+
 ! Struct slot accessors
 
 GENERIC: struct-slot-values ( struct -- sequence )

! class definition

<PRIVATE
: make-struct-prototype ( class -- prototype )
    [ "struct-size" word-prop <byte-array> ]
    [ memory>struct ]
    [ struct-slots ] tri
    [
        [ initial>> ]
        [ (writer-quot) ] bi
        over [ swapd [ call( value struct -- ) ] curry keep ] [ 2drop ] if
    ] each ;

: (struct-methods) ( class -- )
    [ (define-struct-slot-values-method) ]


M: struct-class writer-quot
    nip (writer-quot) ;

: offset-of ( field struct -- offset )
    struct-slots slot-named offset>> ; inline

! c-types

