when
  1. binary_pat
  2. func

Applies the given function whenever the given pattern is in a true state.

"c3 eb3 g3".when("<0 1>/2", x=>x.sub("5")).note()
parametertype
binary_pat
func
  • function
mentioned in (1)