[Swift-devel] Re: [Newslab] Re: Getting all RSS data into database
Ben Clifford
benc at hawaga.org.uk
Wed Feb 27 02:32:43 CST 2008
Note: I added swift-devel to this piece of the thread because it is
relevant there; and perhaps now not so relevant to the newslab list.
On Tue, 26 Feb 2008, Quan Tran Pham wrote:
> > What I think you are trying to do is merge a bunch of files into a single
> big file? (which is not in itself a merge sort)
> I have merge2 that merge two sorted files (contain sorted key + value) into
> one big sorted file.
A different way of thinking about this, which is perhaps more of interest
to the swift development group rather than newslab directly:
Define a binary operator like >+ meaning somthing like
ordered-concatenate, which will combine two files in the appropriate
ordered fashion.
file >+ file --> file
This operator is commutative.
Then have foldC able to fold knowing that the supplied operator is
commutative (so it can split up in a binary fashion, or however other way
it cares to).
Now say:
file[] inputs
file output
output = foldC (>+) inputs
Perhaps foldC should be provided by Swift, with >+ provided as a
procedure.
--
More information about the Swift-devel
mailing list