Interactive functional programs