F# 4.0 Design Patterns
eBook - ePub

F# 4.0 Design Patterns

  1. 318 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

F# 4.0 Design Patterns

Book details
Book preview
Table of contents
Citations

About This Book

Learn how to apply functional F# design patterns to a huge range of programming challenges, and discover a smart route to building better applicationsAbout This Bookā€¢ This book provides a path if you are coming from imperative and object-oriented paradigms ā€¢ It will take you to an intermediate level of functional programming in very practical manner to write enterprise-quality idiomatic F# codeā€¢ Tackle complex computing problems with simple code by fully embracing the functional-first F# paradigmā€¢ Packed full of practical coding examples to help you master F# programming and author optimal codeWho This Book Is ForThis book is for.NET developers, web programmers, C# developers, and F# developers. So, if you have basic experience in F# programming and developing performance-critical applications, then this book is for you.What You Will Learnā€¢ Acquire the practical knowledge to use the main functional design patternsā€¢ Realign some imperative and object-oriented principles under the functional approachā€¢ Develop your confidence in building and combining first-order and higher-order functionsā€¢ Learn to use core language pattern matching effectivelyā€¢ Make use of native F# algebraic data types in place of custom-built classesā€¢ Recognize and measure the difference in resource consumption between sequences and materialized data collectionsā€¢ Navigate and use F# Core libraries with ease by seeing patterns behind specific library functionsā€¢ Master writing generic polymorphic codeIn DetailFollowing design patterns is a well-known approach to writing better programs that captures and reuses high-level abstractions that are common in many applications. This book will encourage you to develop an idiomatic F# coding skillset by fully embracing the functional-first F# paradigm. It will also help you harness this powerful instrument to write succinct, bug-free, and cross-platform code.F# 4.0 Design Patterns will start off by helping you develop a functional way of thinking. We will show you how beneficial the functional-first paradigm is and how to use it to get the optimum results. The book will help you acquire the practical knowledge of the main functional design patterns, the relationship of which with the traditional Gang of Four set is not straightforward.We will take you through pattern matching, immutable data types, and sequences in F#. We will also uncover advanced functional patterns, look at polymorphic functions, typical data crunching techniques, adjusting code through augmentation, and generalization. Lastly, we will take a look at the advanced techniques to equip you with everything you need to write flawless code.Style and approachThis book will teach you how to write F# code in an idiomatic functional-first manner, thereby improving the productivity of F# programmers. This book is ideal for an F# programmer who wants using F# in functional-first way.

Frequently asked questions

Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access F# 4.0 Design Patterns by Gene Belitski in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in C#. We have over one million books available in our catalogue for you to explore.

Information

Year
2016
ISBN
9781785889516
Edition
1

F# 4.0 Design Patterns


F# 4.0 Design Patterns

Copyright Ā© 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: November 2016
Production reference: 1251116
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78588-472-6
www.packtpub.com

Credits

Author
Gene Belitski
Copy Editor
Stuti Srivastava
Reviewer
Michael Newton
Project Coordinator
Izzat Contractor
Commissioning Editor
Kunal Parikh
Proofreader
Safis Editing
Acquisition Editor
Kirk D'costa
Indexer
Rekha Nair
Content Development Editor
Priyanka Mehta
Graphics
Abhinash Sahu
Technical Editors
Bhavin Savalia
Dhiraj Chandanshive
Production Coordinator
Aparna Bhagat

About the Author

Gene Belitski is an accomplished professional software developer with a passion for functional programming. He is a proud representative of the fourth consecutive generation in a family of engineers.
In his professional career Gene was a member of the core development team at Multex.com, a start-up known for bringing Internet and PDF technologies to capital markets.
The author also spent a decade with Reuters, owning the application development for the collection and production of Reuters Consensus and Detail Estimates financial data consumed by quantitative hedge funds.
Currently with Jet.com Inc., Gene is enjoying hands-on development as a lead of the team building a line of business F# applications for their finance division.
He lives with his family on a rare tranquil backstreet of New York City between a park and a beach. In his spare time, Gene plays with code or reads books with his two feline sidekicks ā€“ the Turkish Angora siblings Cheri and Musya.
You can find Gene online on LinkedIn (https://www.linkedin.com/in/genebelitski) and StackOverflow (http://stackoverflow.com/users/917053/gene-belitski).
Gene occasionally blogs at https://infsharpmajor.wordpress.com and https://tech.jet.com. He is one of the founding members of F# Foundation (http://fsharp.org/)

Acknowledgements

This book wraps up a chain of events stretching along a period of almost two dozen years of my life. Behind all these events of various kinds and scopes were people whose valuable contributions and positive attitude allowed me to deliver. I want to use this opportunity and express my admiration for them.
Thanks to my Mom and Dad, who spotted my interest in math and computers early and provided a tremendous amount of love, understanding, and support needed for converting a kidā€™s passion into a profession.
I am grateful to my closest friends, who caught me at the brink of an academic career failure and helped me make a fresh start as a computer software practitioner. Michael and Michael, I value your help and our friendship tremendously.
I am so thankful to my first U.S. employer for being there for me, for his empathy, generosity, and friendliness. Bill, you personify for me the best of the genuine American spirit. Iā€™ll never forget your helping hand.
Turning to the bookā€™s subject, I must admit that my fascination with F# was influenced to a great extent by the alliance with the amazing F# community. Folks, I admire your professional excellence, knowledge-sharing generosity, your brilliant OSS contributions, your vibrant attitude. You are the source of permanent inspiration.
Further, this book never would have happened without continuing support from Jet.com, the e-commerce company that I have the privilege to work for. I praise you, Purple People, for the engineering courage of putting F# at the cornerstone of Jetā€™s technology, for the outstanding atmosphere of enthusiasm and thirst for knowledge, for the freedom to explore, for providing the necessary resources. Jet.com Technology is an exceptional workplace for software engineers to thrive. I hope that this book encourages more great folks to join us.
And finally, completing this book would never be possible without the support, sacrifice, patience and forgiveness that my family is continuously delivering my way. Thank you for everything, my dear, you are the best.

About the Reviewer

Michael Newton is a Developer, Architect, Trainer, and Consultant; Michael runs @mavnn Ltd. along with his wife, providing training and consultancy. If it relates to learning about or using anything that relates to .NET, functional programming, or build/infrastructure tooling, we can probably help you.
He blogs at http://blog.mavnn.co.uk, including tutorials, thoughts on software design, and write ups of many of the training sessions.

www.PacktPub.com

For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
www.PacktPub.com
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.

Why subscribe?

  • Fully searchable across every book published by Packt
  • Copy and paste, print, and bookmark content
  • On demand and accessible via a web browser

Preface

Following design patterns is a well-known approach to writing better programs that captures and reuses the high-level abstractions that are common in many applications. This book will encourage you to develop an idiomatic F# coding skillset by fully embracing the functional-first F# paradigm. It will also help you harness this powerful instrument to write succinct, bug-free, and cross-platform code.
F# 4.0 Design Patterns will start off by helping you develop a functional way of thinking. We will show you how beneficial the functional-first paradigm is and how to use it to get the optimum results. The book will help you acquire the practical knowledge of the main functional design patterns, relationship of which with the traditional ā€œGang of Fourā€ set is not straightforward.
We will take you through pattern matching, immutable data types, and sequences in F#. We will also uncover advanced functional patterns, look at polymorphic functions, see typical data crunching techniques, and learn adjusting code through augmentation and generalization. Lastly, we take a look at the advanced techniques to equip you with everything you may need to write flawless code. In addition, we will explore how the paradigm shift to functional-first affects the design principles and patterns of the object-oriented universe and wrap up the book with specifics of functional code troubleshooting.
By reading this book you will achieve the following goals:
  • Acquire the practical knowledge to use the main functional design patterns
  • Realign some imperative and object-oriented principles under the functional approach
  • Develop your confidence in building and combining first-order and higher-order functions
  • Learn how to use core language pattern matching effectively
  • Learn how to use embedded algebraic data types in place of custom types for added effectiveness and code succinctness
  • Navigate and use F# core libraries with ease by seeing patterns behind specific library functions
  • Recognize and measure the difference in resource consumption between sequences and materialized data structures
  • Maste...

Table of contents

  1. F# 4.0 Design Patterns