by longlivedeath · 14y ago · 0 comments
shuffle :: (ChoiceMonad m, Eq a) => [a] -> m [a] shuffle [] = return [] shuffle elems = do x <- choice elems xs <- shuffle (x `delete` elems) return (x:xs)
No comments yet.