Text this: Programming of refractive functions