By Joshua Backfield

when you've got an critical (and most likely object-oriented) programming history, this hands-on ebook will consultant you thru the alien international of useful programming. writer Joshua Backfield starts slowly through displaying you ways to use the main necessary implementation options ahead of taking you additional into functional-style techniques and practices.

In each one bankruptcy, you’ll examine a practical proposal after which use it to refactor the fictitious Xxy company’s imperative-style legacy code, writing and trying out the practical code your self. As you move in the course of the booklet, you’ll migrate from Java 7 to Groovy and eventually to Scala because the want for larger sensible language aid steadily increases.

  • Learn why today’s finely tuned functions paintings larger with sensible code
  • Transform imperative-style styles into sensible code, following easy steps
  • Get up to the mark with Groovy and Scala via examples
  • Understand how top notch features are handed and back from different functions
  • Convert current equipment into natural features, and loops into recursive methods
  • Change mutable variables into immutable variables
  • Get hands-on adventure with statements and nonstrict evaluations
  • Use practical programming along object-oriented design

Show description

Read or Download Becoming Functional PDF

Best Programming books

Embedded C

For those who are approximately to jot down their first embedded application - or were suffering to profit approximately this crucial sector - this e-book will keep weeks of attempt.

Cocoa Design Patterns

“Next time a few child exhibits up at my door inquiring for a code overview, this is often the e-book that i'm going to throw at him. ”   –Aaron Hillegass, founding father of substantial Nerd Ranch, Inc. , and writer of Cocoa Programming for Mac OS X   Unlocking the secrets and techniques of Cocoa and Its Object-Oriented Frameworks   Mac and iPhone builders are usually crushed by means of the breadth and class of the Cocoa frameworks.

C++ Primer (5th Edition)

Bestselling Programming educational and Reference thoroughly Rewritten for the recent C++11 typical   totally up-to-date and recast for the newly published C++11 average, this authoritative and finished advent to C++ may help you to profit the language speedy, and to take advantage of it in sleek, powerful methods.

Operating System Concepts

Maintain speed with the fast-developing international of working platforms Open-source working structures, digital machines, and clustered computing are one of the prime fields of working platforms and networking which are swiftly altering. With huge revisions and organizational adjustments, Silberschatz, Galvin, and Gagne’s working process thoughts, 8th variation continues to be as present and appropriate as ever, supporting you grasp the elemental innovations of working platforms whereas getting ready your self for today’s rising advancements.

Extra resources for Becoming Functional

Show sample text content

In case you start to go round elements of the applying itself, you open up the probabilities of your code and what you could accomplish. Index Symbols :: operator, Extracting Lists? : (see ternary operator)@Lazy annotation, Nonstrict (Lazy) Evaluationexample of excellent utilization in Groovy, Laziness Can Create Problemslaziness challenge in Groovy, Laziness Can Create Problems@tailrec annotation, Introducing Scala A trade constructors (Scala), Block Statementsanonymous services, nameless Functionsclosures, Closureslambda features, Lambda Functionsappending instead of prepending to output record, Tail Recursionassignment statements, Statements B Backus, John, Introductionbean technique in Java, every little thing Is a Statementblock statements, Block Statementsbody of a functionality, capabilities as gadgets C Calendar item, Block Statementscase periods, Extracting Lists, the choice development (Extension of Null item Pattern)CommandLineOption, Code as DataCustomer category outlined as, changing to development Matchesmatching a selected price in, Extracting Objectscase key-phrase, defining styles, easy Matchesclassesreducing quantity with sensible OOP, ConclusionScala, uncomplicated StatementsClojure, What subsequent? closed-over variables, marking as ultimate, Closuresclosures, nameless features, Closuresbreaking functionality purity, Output will depend on Inputusing with eachEnabledContact (example), Mutabilitycode examples from this ebook, how one can touch UsCommand trend, ConclusionScala Command trend utilizing capabilities, ConclusionCommandLine item (example), Code as DataaskForInput process, Code as Dataoptions variable, Code as Dataprint every one enabled touch choice, Code as Dataprompt technique, Code as Datausing in useful database, placing all of it TogetherCommandLineOption classification (example), Code as Datausing in sensible database, placing all of it Togethercomprehensions, every thing Is a Statementconcurrencyadding risky key-phrase while utilizing @Lazy in Groovy, Nonstrict (Lazy) Evaluationbugs in, Mutabilityfunctional programming and, useful Programming and Concurrencymessage passing for, Message Passing for ConcurrencyContact category (example)rewriting from Java into Scala, easy StatementsScala sendEmail process dealing with isDearReader, items As ContainersScala sendEmail procedure, unique, Static EncapsulationScala sendEmail approach, refactored, Static EncapsulationContact. java dossier, MutabilityContract classification (example), Output will depend on Inputconstructor to create new item with all individuals set, Immutabilityconverting Java type to Scala, Block StatementsgetCustomerById() functionality, Output is dependent upon Inputmaking it immutable, Immutabilitysetters returning this, facet EffectscountEnabledCustomersWithNoEnabledContacts functionality (example), Recursion–Recursionrefactoring to exploit tail recursion, Refactoring Our countEnabledCustomersWithNoEnabledContacts FunctionCustomer category (example)converting from Java to Scala, every little thing Is a StatementCustomer. java dossier, creation to XXYdefined as case type, changing to trend MatcheseachEnabledContact approach, printing out contacts, Code as DataenabledContacts() strategy, Strict and Nonstrict Evaluations–Nonstrict (Lazy) EvaluationgetEnabledCustomerNames functionality, capabilities as Objectsimmutable buyer item, Immutabilitymaking patron.

Rated 4.58 of 5 – based on 33 votes