Path: utzoo!attcan!uunet!mcsun!ukc!canon!otto From: otto@canon.co.uk (G. Paul Otto) Newsgroups: comp.lang.functional Subject: Re: Extensional functions in SML? Message-ID: <1990Oct1.130030.4575@canon.co.uk> Date: 1 Oct 90 13:00:30 GMT References: <1990Sep20.074513.19190@d.cs.okstate.edu> <2279@gould.doc.ic.ac.uk> <11396@alice.UUCP> Sender: G. Paul Otto Reply-To: otto@canon.co.uk Organization: Canon Research Europe, Guildford, UK Lines: 22 In article <11396@alice.UUCP> dbm@alice.UUCP (mh8896) writes: > >Standard ML does have references and assignments, and some implementations >(such as Standard ML of New Jersey) have arrays with destructive array >update. So it is possible to define hash tables. src/util/intmap.sml >in the SML of New Jersey distribution is one such definition. > >Dave MacQueen >macqueen@research.att.com Apologies for my ignorance about ML, but I'm curious: can you define a generic hash function in ML? (i.e. a function which can take a argument of *any* type (on which equality is defined), and map it (in some plausible way) onto a range of integers.) If so, how? Paul ------------------------------------ Paul Otto, Canon Research Centre Europe Ltd., 17-20 Frederick Sanger Rd, Surrey Research Park, Guildford, Surrey, GU2 5YD, UK. NRS: otto@uk.co.canon Internet: otto%canon.co.uk UUCP: otto@canon.uucp PATH: ..!mcsun!ukc!uos-ee!canon!otto Tel: +44 483 574325 Fax: +44 483 574360