john at repetae.net
Sun Oct 22 23:13:34 EDT 2006
On Mon, Oct 23, 2006 at 12:33:35PM +1000, Donald Bruce Stewart wrote:
> > On 10/22/06, Donald Bruce Stewart <dons at cse.unsw.edu.au> wrote:
> > >Let's get join and split done!
> > Patches attached.
> > I think J?n's suggestion 'intercalate' was pretty sweet. I've chosen
> > to use that name in my patch.
> Great. I think I actually prefer joinWith now. It's a lot easier for
> new programmers, and we chose that for ByteString too :)
> Can you perhaps change it to joinWith, and then commit, assuming no
> strong complaints emerge in the next day or two?
I like intercalate better too. 'join' is way too oveloaded as is. I
think of lattices first (meet and join) and monads second....
intercalate means exactly what we want. I would also much prefer the more
intercalate :: Monoid w => a -> [a] -> w a
intercalate x xs = mconcat (intersperse x xs)
Although, now that we lost the Monoid instance for functions (which is
very dismaying), it is less useful, as the monoid functions were very
useful to build things up efficiently with (String -> String) as a type.
John Meacham - ⑆repetae.net⑆john⑈
More information about the Libraries