How can I add audio effects to a running pattern?

A frequent performance pattern I run into is that I set up a pattern playing and then I execute the same pattern with some new audio effects. For example:

-- set up a pattern
d1 $ s "soundcheck" # n five_randoms # gain 2

-- now add delay
d1 $ s "soundcheck" # n five_randoms # gain 2
  # lock 1
  # delay 1
  # delayt delay_vals
  # delayfb rand

-- now add squiz
d1 $ s "soundcheck" # n five_randoms # gain 2
  # lock 1
  # delay 1
  # delayt delay_vals
  # delayfb rand
  # squiz light_squiz

I read the section of the docs called "Accumulation" because that sounds appropriate, but I don't see a function to that allows one to accumulate or add more params in this way. In programming terms this is something like function currying perhaps. Is there a way to clean this up a bit? Is there some way to add more parameters to a running pattern?

I'm not sure if I understand your problem. This looks quite clean to me!

You may be interested in custom abbreviations, for example I've seen a lot of people use the following (including me):

let delay' a t fb = delay a # delayt t # delayfb fb

d1 $ s "bd/2 ~ ~ bd" # delay' 0.5 0.3 0.8

Maybe you should also consider commenting in and out your effects!

d1 $ s "soundcheck" # n five_randoms # gain 2
  # lock 1
--  # delay 1
--  # delayt delay_vals
--  # delayfb rand
--  # squiz light_squiz

Search for whichever keyboard shortcuts comments in and out on your IDE / text editor!