A functional version