资源描述:
《Programming in Standard ML .pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、ProgramminginStandardML(WORKINGDRAFTOFAUGUST8,2010.)RobertHarperCarnegieMellonUniversitySpringSemester,2005Copyrightc2008.AllRightsReserved.ThisworkislicensedundertheCreativeCommonsAttribution-Noncommercial-NoDerivativeWorks3.0UnitedStatesLicense.Toviewacopyofthislicense,visithttp://cr
2、eativecommons.org/licenses/by-nc-nd/3.0/us/,orsendalettertoCreativeCommons,171SecondStreet,Suite300,SanFrancisco,California,94105,USA.PrefaceThisbookisanintroductiontoprogrammingwiththeStandardMLpro-gramminglanguage.ItbeganlifeasasetoflecturenotesforComputerScience15–212:PrinciplesofPr
3、ogramming,thesecondsemesterofthein-troductorysequenceintheundergraduatecomputersciencecurriculumatCarnegieMellonUniversity.IthassubsequentlybeenusedinmanyothercoursesatCarnegieMellon,andatanumberofuniversitiesaroundtheworld.ItisintendedtosupersedemyIntroductiontoStandardML,whichhasbeen
4、widelycirculatedoverthelasttenyears.StandardMLisaformallydefinedprogramminglanguage.TheDefini-tionofStandardML(Revised)istheformaldefinitionofthelanguage.ItissupplementedbytheStandardMLBasisLibrary,whichdefinesacommonbasisoftypesthataresharedbyallimplementationsofthelanguage.Com-mentaryonS
5、tandardMLdiscussessomeofthedecisionsthatwentintothedesignofthefirstversionofthelanguage.ThereareseveralimplementationsofStandardMLavailableforawidevarietyofhardwareandsoftwareplatforms.Thebest-knowncompilersareStandardMLofNewJersey,MoscowML,MLKit,andPolyML.Theseareallfreelyavailableonth
6、eworldwideweb.PleaserefertoTheStandardMLHomePageforup-to-dateinformationonStandardMLanditsimplemen-tations.Numerouspeoplehavecontributeddirectlyandindirectlytothistext.Iamespeciallygratefultothefollowingpeoplefortheirhelpfulcommentsandsuggestions:NelsBeckman,MarcBezem,JamesBostock,Terr
7、enceBrannon,FranckvanBreugel,MatthewWilliamCox,KarlCrary,YaakovEisenberg,MattElder,MikeErdmann,MatthiasFelleisen,AndreiFormiga,StephenHarris,JoelJones,DavidKoppstein,JohnLafferty,FlavioLerda,AdrianMoos,BryceNichols,MichaelNorrish,ArthurJ.O’Dwyer,FrankPfenning,ChrisStone,DaveSwasey,Mi