findIfcsWFactory :: AST.SliceDecl -> Map.Map [String] AST.SliceDecl
findIfcsWFactory ast = Map.foldlWithKey (\acc k v -> if pred k then Map.insert (reverse k) v acc else acc) Map.empty interfaces
  where
    interfaces = findInterfaces [] ast
    pred k   = let k' = (head k ++ "Factory") : tail k in Map.member k' interfaces
findIfcsWFactory :: AST.SliceDecl -> Map.Map [String] AST.SliceDecl
findIfcsWFactory ast = Map.foldlWithKey (\acc k v -> if pred k then Map.insert (reverse k) v acc else acc) Map.empty interfaces
  where
    interfaces = findInterfaces [] ast
    pred k   = let k' = (head k ++ "Factory") : tail k in Map.member k' interfaces
findIfcsWFactory ast = Map.foldlWithKey (\acc k v -> if pred k then Map.insert (reverse k) v acc else acc) Map.empty interfaces
  where
    interfaces = findInterfaces [] ast
    pred k   = let k' = (head k ++ "Factory") : tail k in Map.member k' interfaces