let rec
	parPar n	=
		let rec
			f _ 0 L			= (L @ "\n") ||
			f 0 nToGo L		= (f 1 (nToGo-1) (L @ "(")) ||
			f nOpen nToGo L	=
				if nOpen < nToGo
				then
					(f (nOpen+1) (nToGo-1) (L @ "(")) @
					(f (nOpen-1) (nToGo-1) (L @ ")"))
				else
					(f (nOpen-1) (nToGo-1) (L @ ")"))
		in
			f 0 (n*2) []
in
	parPar 4

-- Generate Matched Parentheses
-- Tim Edgoose "time",  17/8/93
