Re:Instagram Engineer Challenge solved with Javascript
by nandemo on Tuesday November 15, 2011 @11:44PM
(#3241814)
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.
Care for some unsolicited hlint-like suggestions?
Why not simply this:
Why not 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.