Copying all the collections stuff from fsharpx