encodeCommands :: [String] -> [Integer]
-encodeCommands cmds = map (fromIntegral . ord) $ concat $ map (++ "\n") cmds
+-- encodeCommands cmds = map (fromIntegral . ord) $ concat $ map (++ "\n") cmds
+encodeCommands = map (fromIntegral . ord) . concat . map (++ "\n")
decodeOutput :: [Integer] -> String
decodeOutput = map (chr . fromIntegral)
powerList [] = [[]]
powerList (x:xs) = powerList xs ++ map (x:) (powerList xs)
-
passSecurity :: Machine -> [String] -> [String] -> String
passSecurity machine instructions items =
"You keep: " ++ (intercalate ", " keeps) ++ "\n\n" ++ (attemptSecurity machine instructions validDropset)