Dynamical systems for metric spacesĀ