Here's the same thing re-written in Python:
d = [compute_diffraction_at_wavelength(x, WAVELENGTH) for x in LensLayers]
d = map(compute_diffraction_at_wavelength(WAVELENGTH), LensLayers)
Here's the same thing re-written in Python:
Or oldschool Python (and still faster, I think):