allDifferent'' xs = inner xs (\x -> x) where
  inner :: Eq a => [a] -> (Bool -> Bool) -> Bool
  inner [] cont = cont True
  inner (x:xs) cont = inner xs (\n -> cont(n && (not (elem x xs))))
allDifferent'' xs = inner xs (\x -> x) where
  inner :: Eq a => [a] -> (Bool -> Bool) -> Bool
  inner [] cont = cont True
  inner (x:xs) cont = inner xs (\n -> cont(n && (not (elem x xs))))
allDifferent'' xs = inner xs (\x -> x) where
  inner :: Eq a => [a] -> (Bool -> Bool) -> Bool
  inner [] cont = cont True
  inner (x:xs) cont = inner xs (\n -> cont(n && (not (elem x xs))))