3 ms·
Very nice. Care for some unsolicited hlint-like suggestions? Why not simply this: img <- readImage "file.png" -- instead of this? t <- readImage
by nandemo 15y ago
Very nice.
Care for some unsolicited hlint-like suggestions?
Why not simply this:
img <- readImage "file.png"
-- instead of this?
t <- readImage "file.png"
let img = t
Why not this:
map (y!!) x
foldr ((:).(y!!)) [] x -- instead of this?
Note that a way of reading fold g [] is that replaces the list constructor (:) (aka cons) with g. So (:) as argument of fold is probably not idiomatic, since foldr (:) [] is the same as id.
- Mgccl 15y agoThanks. hlint-like suggestions are always welcome. I have no idea what was in my mind when I wrote foldr ((:).(y!!)) [] x