Wednesday, December 27, 2006

Good news

It seems will be added to the F# library in its next release. Also, there were quite good responses to the points I raised about library functions in the F# mailing list. Don Syme noted that zip is already there, and it's called List.combine. I hadn't noticed this.

Also, Robert Pickering, author of the upcoming APress book Foundations of F#, responded on his blog with a short version of the ROT13 algorithm, using only functions already present in the current library:

It basically uses List.mapi instead of my combo of zip, drop and take. List.mapi maps a function over a list, but this function gets as arguments the list element and its index. And mapping over a string is implemented by converting the string to a char array, using over it and then creating a new string based on the result.

No comments: