States in declarative languages