[sorted(n: integer) 
 -> beginTrace(),
	let pb: PalmProblem := makePalmProblem("sorted " /+ string!(n), n),
		lvars: list<PalmIntVar> := list<PalmIntVar>()
	in (
		for i in (1 .. n) lvars :add makeIntVar(pb, "x" /+
string!(i), 1, n),
		for i in (1 .. (n - 1)) (
			post(pb, lvars[i] < lvars[i + 1]) ;, propagate(pb)
		),
		propagate(pb),
		printf("~S", lvars)
	),
	endTrace()]
 
