bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18225: Lack of type-converting shared arrays (feature request)


From: Panicz Maciej Godek
Subject: bug#18225: Lack of type-converting shared arrays (feature request)
Date: Fri, 8 Aug 2014 17:48:23 +0200

While it is possible to shuffle with array indices arbitrarily, the
ability to convert array types is very limited. For example, it would
be nice to be able convert a uniform vector of unsigned bytes to a
uniform vector of some other size:

(define bytes #u8(0 0 255 255))

(define words
  (make-typed-shared-array 'u16 (native-endianness) bytes
    (lambda(i)(list (* i 2))) '(0 1))
words
====> #u16(0 65535)

In addition to SRFI-4 types, the conversion should be compatible with
R6RS bytevectors





reply via email to

[Prev in Thread] Current Thread [Next in Thread]