A KAM theorem for infinite--dimensional discrete systems