I wanted to create a macro that can be invoked in the middle of a tikz path and behave differently, conditional on one of the arguments.
Here is an example document:
\documentclass[a4paper]{amsart}
...