How to create a program that controls the speed of a servo using a potentiometer using arduino?

so far. nothing sir, I only have an idea using potentiometer to control the position but not the speed