readBaseN :: [Char] -> [Char] -> (Maybe Int)
readBaseN c x = 
    let nums = [elemIndex y c | y <- x ] 
     in if all isJust nums then Just (foldl (\acc x -> acc + 2 * fromJust x) 0   nums)  else Nothing
readBaseN :: [Char] -> [Char] -> (Maybe Int)
readBaseN c x = 
    let nums = [elemIndex y c | y <- x ] 
     in if all isJust nums then Just (foldl (\acc x -> acc + 2 * fromJust x) 0   nums)  else Nothing
readBaseN c x = 
    let nums = [elemIndex y c | y <- x ] 
     in if all isJust nums then Just (foldl (\acc x -> acc + 2 * fromJust x) 0   nums)  else Nothing