does such code exist??

It is called a "function".