A version that uses generic List classes, rather than specialized Uint8List and Float64List