
24 Apr
2009
24 Apr
'09
9:21 a.m.
Hi
Do I really need to point out the difference between head and fromAscList?
fromAscList is total but may badly destroy the internal (invariant of the) representation. head at least crashes (hopefully fairly soon) when called wrongly.
Better example, sortBy f, where f isn't a valid ordering function. It works, but destroyed internal invariants. Should it be uncheckedSortBy f ? Thanks Neil