资源描述:
《[Études.for.Erlang(2013.3)].J.David.Eisenberg.文字版(1)》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、ÉtudesforErlangJ.DavidEisenbergÉtudesforErlangbyJ.DavidEisenbergCopyright©2010O’ReillyMedia.Allrightsreserved.PrintedintheUnitedStatesofAmerica.PublishedbyO’ReillyMedia,Inc.,1005GravensteinHighwayNorth,Sebastopol,CA95472.O’Reillybooksmaybepurchasedforeduca
2、tional,business,orsalespromotionaluse.Onlineeditionsarealsoavailableformosttitles(http://my.safaribooksonline.com).Formoreinformation,contactourcorporate/institutionalsalesdepartment:800-998-9938orcorporate@oreilly.com.Editor:SimonSt.LaurentInteriorDesigne
3、r:DavidFutatoMarch2013:FirstEditionRevisionHistoryfortheFirstEdition:2013-03-20:FirstreleaseSeehttp://oreilly.com/catalog/errata.csp?isbn=9781449366452forreleasedetails.NutshellHandbook,theNutshellHandbooklogo,andtheO’ReillylogoareregisteredtrademarksofO’R
4、eillyMedia,Inc.EtudesforErlangandrelatedtradedressaretrademarksofO’ReillyMedia,Inc.Manyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarks.Wherethosedesignationsappearinthisbook,andO’ReillyMedia,Inc.,wasawareofatr
5、ade‐markclaim,thedesignationshavebeenprintedincapsorinitialcaps.Whileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorsassumenoresponsibilityforerrorsoromissions,orfordamagesresultingfromtheuseoftheinformationcontainedherein.ISBN:
6、978-1-449-36645-2[]TableofContentsÉtudesforErlang..............................................................viiPreface:What’sanétude?......................................................xvii1.GettingComfortablewithErlang................................
7、..............1Étude1-1:ExperimentingwithErrors12.FunctionsandModules.......................................................3Étude2-1:WritingaFunction3Étude2-2:DocumentingaModule3Étude2-3:DocumentingaFunction43.Atoms,Tuples,andPatternMatching..............
8、.............................5Étude3-1:PatternMatching5Étude3-2:Guards6Étude3-3:Underscores6Étude3-4:TuplesasParameters64.LogicandRecursion..........................................................9Étude4-1:U