[Haskell-cafe] is it possible to implement Functor for ByteString and Text
silvio
silvio.frischi at gmail.com
Tue Mar 3 16:46:46 UTC 2015
cool trick. This is by far the best solution yet. Of course it's a bit
deceptive in what you are working with. E.g.
bs1 <- pack [1..10]
print bs1
let bs2 = map (+1) bs1
print bs2
let bs3 = map (+1) bs2
print bs3
...
let bsn = map (+1) bsn_1
print bsn
will have quadratic complexity. On the other, hand you will get fusion
for free.
silvio
More information about the Haskell-Cafe
mailing list