smltutorial - In troduct iontoS tandardM L R obertH arper C...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: In troduct iontoS tandardM L R obertH arper C on ten ts In troduct ion TheC oreLanguage . In teract ingw ithM L ::::::::::::::::::::::: . B as icexp ress ion s ,va lues ,andtypes ::::::::::::::: .. U n it :::::::::::::::::::::::::::: .. B oo lean s :::::::::::::::::::::::::: .. In tegers :::::::::::::::::::::::::: .. S tr ings ::::::::::::::::::::::::::: .. R ea lN um bers ::::::::::::::::::::::: .. T up les ::::::::::::::::::::::::::: .. L ists :::::::::::::::::::::::::::: .. R ecord s :::::::::::::::::::::::::: . Iden t iers ,b ind ings ,anddec larat ion s :::::::::::::: . P attern s :::::::::::::::::::::::::::::: . D en ingfunct ion s ::::::::::::::::::::::::: . P o lym orph ism andO ver load ing ::::::::::::::::: . D en ingtypes ::::::::::::::::::::::::::: . Excep t ion s ::::::::::::::::::::::::::::: . Im perat ivefeatu res :::::::::::::::::::::::: TheM odu lesSy stem . O verv iew :::::::::::::::::::::::::::::: . S tructu resandS ignatu res :::::::::::::::::::: . A b stract ion s :::::::::::::::::::::::::::: . Functors :::::::::::::::::::::::::::::: . Them odu lessy stem inp ract ice ::::::::::::::::: iii iv CONTENTS Inpu t-O u tpu t AA n sw ers A cknow ledgem en ts Severa lo ftheexam p lesw erecr ibbed fromLucaC arde lli'sin troduct iontoh is d ia lecto fM L ,fromR ob inM ilner 'scorelanguageden it ion ,fromD ave M acQ ueen 'sm odu lespaper,and fromA be lsonandSu ssm an 'sbook . Joach imP arrow ,D onSanne lla ,andD av idW a lkerm adem anyhe lp fu lsug- gest ion s . v ii Chap ter In troduct ion Thesenotesarean in troduct iontotheS tandardM Lp rogramm ing language . H erearesom eo ftheh igh ligh tso fS tandardM L : M L isa func tiona l p rogramm inglanguage .Funct ion sarerst-c lass dataob jects :theym aybepassedasargum en ts ,retu rnedasresu lts , andstored invar iab les .Thep r inc ipa lcon tro lm echan ism inM L is recu rs ivefunct ionapp licat ion . M L isan in terac tive language .Everyph raseread isana lyzed ,com p iled , andexecu ted ,andtheva lueo ftheph raseisreported ,togetherw ith its type . M L is strong lytyped .Every lega lexp ress ionhasatypewh ich isdeter- m inedau tom at ica llybythecom p iler .S trongtyp ingguaran teesthat nop rogram can incu ratypeerroratrunt im e ,acomm onsou rceo f bugs . M Lhasa po lym orph ic typesy stem .E ach lega lph rasehasaun ique ly- determ inedm ostgenera ltyp ingthatdeterm inestheseto fcon tex tsin wh ichthatph rasem aybelega llyu sed . M L supports abstrac ttypes .A b stracttypesareau se fu lm echan ism for p rogramm odu lar izat ion .N ew typestogetherw ithaseto ffunct ion son ob jectso fthattypem aybedened .Thedeta ilso ftheim p lem en tat ion areh idden from theu sero fthetype ,ach iev ingadegreeo fiso lat ion thatiscruc ia ltop rogramm a in tenance . CHAPTER .INTRODUCT ION M L is sta tica llyscoped .M Lreso lvesiden t ierre ferencesatcom p ile t im e ,lead ingtom orem odu larandm oreec ientp rogram s . M Lhasatype-sa fe excep tion m echan ism .Excep t ion sareau se fu l m ean so fhand...
View Full Document

{[ snackBarMessage ]}

Page1 / 106

smltutorial - In troduct iontoS tandardM L R obertH arper C...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online