From: Richard J. <ri...@an...> - 2005-02-15 10:33:26
|
On Mon, Feb 14, 2005 at 08:16:51PM -0500, Aaron Bohannon wrote: > Instead of adding one of these functions, I would much rather see a=20 > "fold" function on strings in the String module. The Array module has=20 > both "iter" and "fold" functions. Why, then, would the String module=20 > provide an "iter" but no "fold"--in a functional language?? The=20 > addition of a fold function would very often eliminate the need to=20 > convert a string to a char list or to introduce imperative-style=20 > programming into an otherwise purely functional section of code (not to= =20 > mention that writing "char_list_of_string" would become trivial if it=20 > ever were necessary to do so). >=20 > I acknowledge the fact that I can write my own fold function, but I just= =20 > wanted to point out that this seems to be the most logical addition to=20 > the String module. If you can suggest suitable fold_left and fold_right functions, then they can be added to ExtLib. Rich. --=20 Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.c= om |