Variables as text transformations
=================================

[[Parent]]: variables.txt

This section introduces variables from the view-point that they
are user-defined text transformations. 

Constant-output macros
----------------------

A variable is a user-defined macro that takes in an arbitrary input, but does not use it.

[[Example]]:
	[[set my_macro]]: Hello world!
	[[my_macro]]
	[[my_macro]]: Arbitrary input.

Constant-output macros have their uses, but more generally we would like to build macros whose output are dependent on the input.

Input-dependent macros
----------------------

Remark passes the parameter of a macro in the `parameter` variable. Using this knowledge we can build a generalized version of our macro:

[[Example]]:
	[[set my_macro]]: Hello [[parameter]]!
	[[my_macro]]: world
	[[my_macro]]: jello

### `parameter` is local to each macro invocation

The `parameter` is a variable local to each macro invocation.

[[Example]]:
	[[set my_macro]]:
		[[set my_replicate]]:
			[[parameter]][[parameter]]
		[[+my_replicate]]: Hello [[parameter]]!
	[[my_macro]]: world
	[[my_macro]]: jello
			
		
		
			


