چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

Functional Swift: Updated for Swift 4

Chris Eidhof & Florian Kugler & Wouter Swierstra

قیمت نهایی

۴۹٬۰۰۰ تومان

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

سال انتشار
۲۰۱۵
فرمت
PDF
زبان
انگلیسی
حجم فایل
۲٫۷ مگابایت
شابک
9783000480058، 3000480056

دربارهٔ کتاب

This book will teach you how to use Swift to apply functional programming techniques to your iOS or OS X projects. These techniques complement object-oriented programming that most Objective-C developers will already be familiar with, providing you with a valuable new tool in your developer’s toolbox. We will start by taking a look at Swift’s new language features, such as higher-order functions, generics, optionals, enumerations, and pattern matching. Mastering these new features will enable you to write functional code effectively. After that, we will provide several examples of how to use functional programming patterns to solve real-world problems. These examples include a compositional and type-safe API around Core Image, a library for diagrams built on Core Graphics, and a small spreadsheet application built from scratch. Functional Swift 3 Introduction 7 Thinking Functionally 11 Example: Battleship 11 First-Class Functions 19 Type-Driven Development 25 Notes 25 Case Study: Wrapping Core Image 27 The Filter Type 27 Theoretical Background: Currying 34 Discussion 36 Map, Filter, Reduce 38 Introducing Generics 38 Filter 43 Reduce 45 Putting It All Together 48 Generics vs. the Any Type 50 Notes 53 Optionals 54 Case Study: Dictionaries 54 Working with Optionals 58 Why Optionals? 65 Case Study: QuickCheck 70 Building QuickCheck 72 Making Values Smaller 76 The Value of Immutability 86 Variables and References 86 Value Types vs. Reference Types 87 Discussion 93 Enumerations 98 Introducing Enumerations 98 Associated Values 101 Adding Generics 103 Swift Errors 105 Optionals Revisited 106 The Algebra of Data Types 107 Why Use Enumerations? 110 Purely Functional Data Structures 111 Binary Search Trees 111 Autocompletion Using Tries 119 Discussion 128 Case Study: Diagrams 129 Drawing Squares and Circles 129 The Core Data Structures 133 Discussion 143 Iterators and Sequences 146 Iterators 146 Sequences 153 Case Study: Traversing a Binary Tree 157 Case Study: Better Shrinking in QuickCheck 158 Case Study: Parser Combinators 161 The Parser Type 162 Combining Parsers 165 Parsing Arithmetic Expressions 176 A Swifty Alternative for the Parser Type 178 Case Study: Building a Spreadsheet Application 181 Parsing 181 Evaluation 188 User Interface 194 Functors, Applicative Functors, and Monads 196 Functors 196 Applicative Functors 199 The M-Word 202 Discussion 205 Conclusion 207 Further Reading 208 Closure 209 Bibliography 210

قیمت نهایی

۴۹٬۰۰۰ تومان