Pure functions, black holes, and miracles