Generalized Banach contraction mapping principle in generalized metric spaces with a ternary relation