module UniqueNames where

getUniqueName::[String]->String->String
getUniqueName tabu wanted =
    if elem wanted tabu then
        head $ filter (not . flip elem tabu) [wanted++show i |i <- [2..]]
    else wanted

getUniqueNames::[String]->[String]->[String]
getUniqueNames tabu [] = []
getUniqueNames tabu (wanted:restWanted) =
    let name = getUniqueName tabu wanted
    in name : getUniqueNames (name:tabu) restWanted

--getSubstitutionList::[String]->[String]->[String]
