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.
https://github.com/Mgccl/mgccl-haskell/blob/master/random/un... (so it seems I don't like to specify the type of my functions...)
Explanation is here: http://chaoxuprime.com/2011/11/a-solution-to-Instagram-engin...