Uncategorized

Macro

For archive (Updated on February 18, 2019)

For our discussion, a Macro is a text pattern with one or more arguments (or parameters).

Three Refuges

Some people take Refuge as follows.

  • I take refuge in the Buddha.
  • I take refuge in the Dhamma.
  • I take refuge in the Sangha.

Macro definition

Let us define a Macro called M with a parameter x as follows:
R(x) = “I take refuge in the x.”
Then, R(Buddha) yields “I take refuge in the Buddha.”

Repetition

  • Some repeat three times.
  • For the first time, I take refuge in the Buddha.
  • For the first time, I take refuge in the Dhamma.
  • For the first time, I take refuge in the Sangha.
  • For the second time, I take refuge in the Buddha.
  • For the second time, I take refuge in the Dhamma.
  • For the second time, I take refuge in the Sangha.
  • For the third time, I take refuge in the Buddha.
  • For the third time, I take refuge in the Dhamma.
  • For the third time, I take refuge in the Sangha.

Two more Macros

Let us define a Macro T with a parameter y as follows :
T(y) = “For the y time, “
Then, T(third) yields “For the third time, “.

Let us define a Macro Pray with two parameters :
Pray(a, b) = T(a)R(b)
Then, Pray(second, Dhamma) yields “For the second time, I take refuge in the Dhamma.”

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s