[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-685640-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-685640-en":130,"doc-similar-685640":288},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","programming-language-principles-and-paradigms-release-04-notes","Programming Language Principles and Paradigms - Release 0.4 - Notes","","A structured set of notes on programming language principles and paradigms, organized into foundational topics, functional programming, and theory. The foundations cover Python basics, data structures, functions, classes, modules, semantics, name binding and environments, control flow including exceptions, and memory management. The functional section emphasizes Scheme, functions and recursion, higher-order functions, lambda functions across languages, and continuations. The theory portion begins with lambda calculus, presenting formal concepts that support later language understanding.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/programming-language-principles-and-paradigms-release-04-notes/685640/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/programming-language-principles-and-paradigms-release-04-notes/685640.png","ImageObject",300,407,{"name":42,"@type":43},"RuangKosong","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-12","2026-11-07",true,{"@type":52,"interactionType":53,"userInteractionCount":33},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"What topics are included in the foundations section?","Question",{"text":62,"@type":63},"The foundations cover Basic Python, fundamental elements, name lookup and environments, control flow (including exceptions), memory management, and formal grammars such as regular expressions and context-free grammars.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"How does the document approach functional programming?",{"text":67,"@type":63},"It introduces Scheme and builds from functions, keyword/default/variadic arguments, recursion and tail recursion, higher-order functions, lambda functions, and continuations.",{"name":69,"@type":60,"acceptedAnswer":70},"What theoretical material is presented at the end?",{"text":71,"@type":63},"The theory section begins with lambda calculus, laying out formal foundations that relate to the document’s coverage of lambdas and continuations.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},685640,1794016120,{"code":4,"msg":81,"data":82},"success",[83,87,91,95,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":92,"show_sort_weight":93,"slug":94},"Exam",70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":33,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":79,"read_time":144,"preview_page_count":145,"preview_urls":146},962090883219,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","Programming Language Principles and Paradigms  \nRelease 0.4  \nAmir Kamil  \nApr 08, 2026  \nCONTENTS  \nI Foundations 1  \n1 Introduction 3  \n2 Basic Python 5  \n2. 1 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5  \n2.2 Basic Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6  \n2.3 Compound Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8  \n2.4 Function Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8  \n2.5 Class Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9  \n2.6 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10  \n2.7 Executing a Module ........................................... 10  \n2.8 Python Reference Semantics ....................................... 11  \n3 Basic Elements 12  \n3.1 Levels of Description ........................................... 12  \n3.2 Entities, Objects, and Variables ..................................... 14  \n3.3 L-Values and R-Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14  \n3.4 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15  \n3.5 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15  \n4 Names and Environments 17  \n4. 1 Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18  \n4.2 Name Lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19  \n4.3 Nested Inline Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20  \n4.4 Scope in Functions ............................................ 21  \n4.5 Static Scope ............................................... 22  \n4.6 Dynamic Scope .............................................. 24  \n4.7 Point of Declaration or Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24  \n4.8 Implementation Strategies ........................................ 26  \n5 Control Flow 28  \n5.1 Expression Sequencing .......................................... 28  \n5.2 Statement Sequences ........................................... 29  \n5.3 Unstructured Transfer of Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30  \n5.4 Structured Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30  \n5.5 Exceptions ................................................ 34  \n5.6 Avoiding Control Flow .......................................... 35  \n6 Memory Management 43  \n6.1 Storage Duration Classes ......................................... 43  \n6.2 Value and Reference Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45  \n6.3 RAII and Scope-Based Resource Management ............................. 48  \n6.4 Garbage Collection ............................................ 50  \n7 Grammars 54  \n7.1 Regular Expressions ........................................... 54  \n7.2 Context-Free Grammars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56  \n7.3 Grammars in Programming Languages ................................. 59  \nII Functional Programming 63  \n8 Introduction to Scheme 65  \n8.1 Expressions ................................................ 65  \n8.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66  \n8.3 Compound Values ............................................ 67  \n8.4 Symbolic Data .............................................. 70  \n9 Functions 72  \n9.1 Keyword Arguments ........................................... 72  \n9.2 Default Arguments ..............","cbCaigVRep5vPQwd","https://ap.wps.com/l/cbCaigVRep5vPQwd","pdf",3398672,309,"English","# I Foundations\n## 1 Introduction\n## 2 Basic Python\n## 3 Basic Elements\n## 4 Names and Environments\n## 5 Control Flow\n## 6 Memory Management\n## 7 Grammars\n# II Functional Programming\n## 8 Introduction to Scheme\n## 9 Functions\n## 10 Recursion\n## 11 Higher-Order Functions\n## 12 Lambda Functions\n## 13 Continuations\n# III Theory\n## 14 Lambda Calculus","[{\"question\":\"What topics are included in the foundations section?\",\"answer\":\"The foundations cover Basic Python, fundamental elements, name lookup and environments, control flow (including exceptions), memory management, and formal grammars such as regular expressions and context-free grammars.\"},{\"question\":\"How does the document approach functional programming?\",\"answer\":\"It introduces Scheme and builds from functions, keyword/default/variadic arguments, recursion and tail recursion, higher-order functions, lambda functions, and continuations.\"},{\"question\":\"What theoretical material is presented at the end?\",\"answer\":\"The theory section begins with lambda calculus, laying out formal foundations that relate to the document’s coverage of lambdas and continuations.\"}]","Programming Language Principles and Paradigms - Release 0.4 - Notes | PDF",779,31,[147,151,155,159,163,167,171,175,179,183,187,192,197,202,207,212,217,222,227,231,235,240,245,250,255,260,265,270,275,280,284],{"page_no":22,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/192d20a24b4966534bbb3c52434c14b0.webp",983,1272,{"page_no":26,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/44a67ede7404de1fdbf8bd69ac2b7d4d.webp",982,1270,{"page_no":30,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/823ab6efb059bc69fb1fe15f7483336e.webp",981,1269,{"page_no":33,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/d95976f08d1385c2ad0a767b0bcf23f2.webp",980,1268,{"page_no":96,"url":164,"width":165,"height":166},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/5144394924c6fedbfae6eb62249a1203.webp",979,1267,{"page_no":101,"url":168,"width":169,"height":170},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/83878452614de9ca48da9d856ca1b43d.webp",978,1265,{"page_no":105,"url":172,"width":173,"height":174},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/fea7f441a1f0ba751e2be373cf73ae55.webp",977,1264,{"page_no":110,"url":176,"width":177,"height":178},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/36e3592384d970c59d4c086ad7022445.webp",976,1263,{"page_no":115,"url":180,"width":181,"height":182},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/450e4abcb236c89e6fd7f3d23729c47c.webp",975,1261,{"page_no":123,"url":184,"width":185,"height":186},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/29c8d8232238633f3fc49daa8eea2310.webp",974,1260,{"page_no":188,"url":189,"width":190,"height":191},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/12747e317336f0bce6f97ba67d870790.webp",973,1259,{"page_no":193,"url":194,"width":195,"height":196},12,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/bf1afe8e134d09849f656674854fc914.webp",972,1257,{"page_no":198,"url":199,"width":200,"height":201},13,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/7a013b8fff9c0aba9640ee2bc2bb8d43.webp",971,1256,{"page_no":203,"url":204,"width":205,"height":206},14,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/2667cb66a9c914beff2ec0cdcee1623c.webp",970,1255,{"page_no":208,"url":209,"width":210,"height":211},15,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/2c85bf96fc50a3ff7f49080d0d7ebf1b.webp",969,1254,{"page_no":213,"url":214,"width":215,"height":216},16,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/e772c6b159cfb57d680749db035b9788.webp",968,1252,{"page_no":218,"url":219,"width":220,"height":221},17,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/2e6046bcc11568e60b49fcf95e3502b9.webp",967,1251,{"page_no":223,"url":224,"width":225,"height":226},18,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/41236fd5f71cf7573729de2316084adb.webp",966,1250,{"page_no":127,"url":228,"width":229,"height":230},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/52660c66443c714ca7e1fdf80bbd0c43.webp",965,1248,{"page_no":117,"url":232,"width":233,"height":234},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/bf4b4dca819cd4bb66a2b8bfe633fe95.webp",964,1247,{"page_no":236,"url":237,"width":238,"height":239},21,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/e285bb228c120a5eec9f3bd6ecb5e0de.webp",963,1246,{"page_no":241,"url":242,"width":243,"height":244},22,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/a16a1518d969f649edc0b7cd239ced0b.webp",962,1245,{"page_no":246,"url":247,"width":248,"height":249},23,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/19fd725036968175df0a224dd87ec83b.webp",961,1243,{"page_no":251,"url":252,"width":253,"height":254},24,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/4dcfba3c396b552aa5ea090f2221191a.webp",960,1242,{"page_no":256,"url":257,"width":258,"height":259},25,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/167f90d24fcdf3329836ac84f3d8540d.webp",959,1241,{"page_no":261,"url":262,"width":263,"height":264},26,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/e982b9143d126d0df157215717c224fa.webp",958,1239,{"page_no":266,"url":267,"width":268,"height":269},27,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/152197358562f74b10a8acb8b3e37712.webp",957,1238,{"page_no":271,"url":272,"width":273,"height":274},28,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/0fd16d73c01811fde0fe1c1ad79ffc9d.webp",956,1237,{"page_no":276,"url":277,"width":278,"height":279},29,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/c334bba8617b6e6aeb67a65c054bdce8.webp",955,1235,{"page_no":112,"url":281,"width":282,"height":283},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/8802b22664134659c11b4dbc4f3ae8f0.webp",954,1234,{"page_no":145,"url":285,"width":286,"height":287},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/66dadfd63a6bd27de2cd37471502ca45.webp",953,1233,{"list":289,"token":11},[290,296,302,308,314,320,326,332,337,343],{"doc_id":291,"doc_title":292,"file_type":137,"home_preview_img_url":293,"slug":294,"view_count":115,"category_name":29,"create_tm":295},657835,"Category Theory for Computing Science","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975776351/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=RXUztG6yls6qV11W4AGdCWJoQPw%3D","category-theory-for-computing-science",1792991660,{"doc_id":297,"doc_title":298,"file_type":137,"home_preview_img_url":299,"slug":300,"view_count":26,"category_name":29,"create_tm":301},734693,"Types and Programming Languages - Preface - Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230032814946/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=wl4wAhiIJdLWKxFGCE6IuDeNiC0%3D","types-and-programming-languages-preface-introduction",1795413686,{"doc_id":303,"doc_title":304,"file_type":137,"home_preview_img_url":305,"slug":306,"view_count":105,"category_name":29,"create_tm":307},692229,"A Beginners Guide to Python 3 Programming","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003011037/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=0XROYwKpqfb04fIOocPOmf1wHQ0%3D","a-beginners-guide-to-python-3-programming-692229",1794186373,{"doc_id":309,"doc_title":310,"file_type":137,"home_preview_img_url":311,"slug":312,"view_count":198,"category_name":29,"create_tm":313},410334,"Programming Paradigms - Part I - Haskell - The Craft of Functional Programming - Second Edition","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229921592848/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=58J8yu4rfthS5rS3Tfym%2FpmRo2A%3D","programming-paradigms-part-i-haskell-the-craft-of-functional-programming-second-edition",1790585005,{"doc_id":315,"doc_title":316,"file_type":137,"home_preview_img_url":317,"slug":318,"view_count":208,"category_name":29,"create_tm":319},417799,"PYTHON PROGRAMMING - R17A0554 - Lecture Notes - B.TECH III YEAR II SEM","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229922495571/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=Vbffw3Bqv4hT2YHlCMABe3sJIsA%3D","python-programming-r17a0554-lecture-notes-btech-iii-year-ii-sem",1790610657,{"doc_id":321,"doc_title":322,"file_type":137,"home_preview_img_url":323,"slug":324,"view_count":22,"category_name":29,"create_tm":325},760744,"Programming in Standard ML - Working Draft March 25, 2001","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044250511/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=OO5gNKIcixFG6HeAykWeorM1AEU%3D","programming-in-standard-ml-working-draft-march-25-2001",1795908965,{"doc_id":327,"doc_title":328,"file_type":137,"home_preview_img_url":329,"slug":330,"view_count":123,"category_name":29,"create_tm":331},692230,"Python Handbook - Updated October 14, 2026","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003011060/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=%2BON2zY9lj3hmkECIyqH0sQMNBC4%3D","python-handbook-updated-october-14-2026",1794186375,{"doc_id":333,"doc_title":304,"file_type":137,"home_preview_img_url":334,"slug":335,"view_count":30,"category_name":29,"create_tm":336},682652,"https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229998958669/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=7nYbXkkWLgQlAWG3%2BJbsi167k54%3D","a-beginners-guide-to-python-3-programming",1793977325,{"doc_id":338,"doc_title":339,"file_type":137,"home_preview_img_url":340,"slug":341,"view_count":33,"category_name":29,"create_tm":342},671798,"Python - Visual QuickStart Guide Table of Contents - Chapter 1 to Appendix B","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988403999/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=tj3ArffeHVsqhOrpAS7p3%2BgINoY%3D","python-visual-quickstart-guide-table-of-contents-chapter-1-to-appendix-b",1793580658,{"doc_id":344,"doc_title":345,"file_type":137,"home_preview_img_url":346,"slug":347,"view_count":213,"category_name":29,"create_tm":348},671794,"Python Tutorial - Release 3.7.0","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988403939/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110439&Signature=Otthbj4M8bQ5vAC1DUYm%2BRapw9M%3D","python-tutorial-release-370",1793580648]