-- splits ns returns the list of all triples (us, v, ws)
-- such that us ++ [v] ++ ws == ns.  For example:
--   splits [0,1,2] = [ ([], 0, [1,2]),
--                      ([0], 1, [2]),
--                      ([0,1], 2, []) ]

splits       :: [Int] -> [([Int], Int, [Int])]
splits [x]    = [ ( [], x, [])]
splits       :: [Int] -> [([Int], Int, [Int])]
splits [x]    = [ ( [], x, [])]
splits [x]    = [ ( [], x, [])]