it was indeed a piece of shitty code. Linus has right to protect his baby.
146 karma · joined September 21, 2013
--This sounds really bad. Like a slave trying to move more bricks to show slave-owner that he is not being paid enough.
http://people.cs.clemson.edu/~dhouse/courses/405/papers/opti...
But barely no one likes Adobe flash. Their software quality is getting lower and lower. Too much bureaucracy always shown in these companies.
import Control.Monad
queens n = foldM (\y _ -> [ x : y | x <- [1..n], safe x y 1]) [] [1..n] safe x [] n = True safe x (c:y) n = and [ x /= c , x /= c + n , x /= c - n , safe x y (n+1)]
main = mapM_ print $ queens 8
---- http://en.wikibooks.org/wiki/Algorithm_Implementation/Miscel...
My personal favorite one is C though.