1 functor F (P
: PACK_WORD
) =
3 val v
= Word8Vector
.tabulate (11, Word8.fromInt
)
5 fun p i
= print (concat
[LargeWord
.toString (P
.subVec (v
, i
)), "\n"])
11 (fn i
=> p i
handle Subscript
=> print
"OK\n")
12 [~
1, 2, valOf
Int.maxInt
]
15 structure S
= F (PackWord32Little
)
16 structure S
= F (PackWord32Big
)
18 functor F (P
: PACK_WORD
) =
20 val a
= Word8Array
.tabulate (11, Word8.fromInt
)
22 val _
= P
.update (a
, 0, 0wxFFFEFDFC
)
24 fun p i
= print (concat
[LargeWord
.toString (P
.subArr (a
, i
)), "\n"])
30 (fn i
=> p i
handle Subscript
=> print
"OK\n")
31 [~
1, 2, valOf
Int.maxInt
]
34 structure S
= F (PackWord32Little
)
35 structure S
= F (PackWord32Big
)