Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!munnari.oz.au!uniwa!bilby.cs.uwa.oz.au!melomys!fraser From: fraser@bilby.cs.uwa.oz.au (Fraser Wilson) Newsgroups: comp.lang.functional Subject: Re: A question about types in ML Message-ID: Date: 12 Nov 90 08:36:27 GMT References: Distribution: comp Organization: Dept. Computer Science, University of Western Australia. Lines: 19 In paula@SHUM.HUJI.AC.IL (Paula Ross) writes: >Is there any way in ML that you can create a data type which accepts >sequences of objects of different types (when the number and types of the >objects are not known in advance) ? >i.e. can you create a list type without the restriction that each element of >the list must be of the same type ? As far as I know you can only do this using a union type, which means you have to know what types you will get. I don't think it can be done for an arbitary type. Fraser Wilson | Of all the knights in Appledore fraser@bilby.cs.uwa.oz | The bravest was Sir Thomas Tom | He multiplied as far as four There can be only one! | And knew what nine was taken from - CM | To make eleven. He could write | A letter to another knight. - A.A Milne