
3 May
2011
3 May
'11
7:39 a.m.
Does it have an obvious default implementation, bearing in mind it we
might really want a total function?
sconcat [] = error "Yikes - I wish this was total!"
sconcat [a] = a
sconcat (a:as) = a <> sconcat as
Best wishes
Stephen
On 3 May 2011 12:12, Yitzchak Gale
It has the obvious default implementation, but allows for an optimized implementation for specific instances. That turns out to be something that comes up all the time (at least for me) in real life.