Peel and dice pumpkin and potatoes. Chop onion and simmer in half the butter until golden; add diced pumpkin and potatoes, beans and milk. Bring to a boil and simmer for 45 minutes, stirring from time to time to prevent scorching. Strain through a fine sieve into a clean saucepan or put through blender; season to taste with salt and cayenne pepper.
Cut leeks into fine strips and “melt”