Write WindowFunction class.