Derangements by henkma

l="123456"
main=mapM putStrLn$foldr(%)[""]l
a%b=[x:y|x<-l,y<-b,all(/=x)$a:y]

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page