view samples/sort.tp @ 336:2a0463c46913

Add hash method to float types and make hash always return a 32-bit int
author Michael Pavone <pavone@retrodev.com>
date Fri, 03 Apr 2015 23:07:06 -0700
parents fb54a3af9c86
children
line wrap: on
line source

#{
	main <- {
		a <- #[1 2 3 4 5 6 7 8 9]
		b <- #[9 8 7 6 5 4 3 2 1]
		c <- #[1 3 5 7 9 2 4 6 8 10]
		d <- #[10 8 6 4 2 9 7 5 3 1]
		a sort
		print: (a join: " ") . "\n"
		b sort
		print: (b join: " ") . "\n"
		c sort
		print: (c join: " ") . "\n"
		d sort
		print: (d join: " ") . "\n"
	}
}