Hi,
The delay function outputs what it receives but some time later. So in the case of delay(3,y), it doesn't do much as the input y doesn't change. In other words, it outputs the value of y (which isn't changing) with a 3 second delay.
The usual usage of the delay function is if you want to generate multiple waves to control multiple fixtures and you want each fixture to have an offset. For example, the 2nd fixture has a 100ms delay, the 3rd has a 200ms delay, etc.