[Haskell-cafe] Efficient M to N conversion on fusion?

iquiw iku.iwasa at gmail.com
Tue Feb 16 05:52:51 EST 2010


Hi,

Is there any efficient way to convert M-length ByteString, Text or
Vector into N-length one?

For example,
 (a) converting byte array into array of their hex representations.
("abc" => "616263")
 (b) escaping some specific characters in string. ("a\bc" => "a\\bc")

The only way I found is to use concatMap...

Thanks,
iquiw


More information about the Haskell-Cafe mailing list