did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9781558607019

Higher-Order Perl

by
  • ISBN13:

    9781558607019

  • ISBN10:

    1558607013

  • Format: Paperback
  • Copyright: 2005-03-14
  • Publisher: Elsevier Science

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
  • Complimentary 7-Day eTextbook Access - Read more
    When you rent or buy this book, you will receive complimentary 7-day online access to the eTextbook version from your PC, Mac, tablet, or smartphone. Feature not included on Marketplace Items.
List Price: $84.95 Save up to $21.24
  • Buy Used
    $63.71
    Add to Cart Free Shipping Icon Free Shipping

    USUALLY SHIPS IN 2-4 BUSINESS DAYS

    7-Day eTextbook Access 7-Day eTextbook Access

Supplemental Materials

What is included with this book?

Summary

Most Perl programmers were originally trained as C and Unix programmers, so the Perl programs that they write bear a strong resemblance to C programs. However, Perl incorporates many features that have their roots in other languages such as Lisp. These advanced features are not well understood and are rarely used by most Perl programmers, but they are very powerful. They can automate tasks in everyday programming that are difficult to solve in any other way. One of the most powerful of these techniques is writing functions that manufacture or modify other functions. For example, instead of writing ten similar functions, a programmer can write a general pattern or framework that can then create the functions as needed according to the pattern. For several years Mark Jason Dominus has worked to apply functional programming techniques to Perl. Now Mark brings these flexible programming methods that he has successfully taught in numerous tutorials and training sessions to a wider audience.

Table of Contents

Preface xv
Recursion and Callbacks
1(40)
Decimal to Binary Conversion
1(2)
Factorial
3(3)
Why Private Variables Are Important
5(1)
The Tower of Hanoi
6(6)
Hierarchical Data
12(4)
Applications and Variations of Directory Walking
16(9)
Functional Versus Object-Oriented Programming
25(1)
Html
26(7)
More Flexible Selection
32(1)
When Recursion Blows up
33(8)
Fibonacci Numbers
33(2)
Partitioning
35(6)
Dispatch Tables
41(22)
Configuration File Handling
41(13)
Table-Driven Configuration
43(2)
Advantages of Dispatch Tables
45(4)
Dispatch Table Strategies
49(3)
Default Actions
52(2)
Calculator
54(9)
HTML Processing Revisited
59(4)
Caching and Memoization
63(52)
Caching Fixes Recursion
65(1)
Inline Caching
66(2)
Static Variables
67(1)
Good Ideas
68(1)
Memoization
69(1)
The Memoize Module
70(10)
Scope and Duration
71(1)
Scope
72(1)
Duration
73(3)
Lexical Closure
76(3)
Memoization Again
79(1)
Caveats
80(4)
Functions Whose Return Values Do Not Depend on Their Arguments
80(1)
Functions with Side Effects
80(1)
Functions That Return References
81(1)
A Memoized Clock?
82(1)
Very Fast Functions
83(1)
Key Generation
84(12)
More Applications of User-Supplied Key Generators
89(1)
Inlined Cache Manager with Argument Normalizer
90(3)
Functions with Reference Arguments
93(1)
Partitioning
93(1)
Custom Key Generation for Impure Functions
94(2)
Caching in Object Methods
96(4)
Memoization of Object Methods
99(1)
Persistent Caches
100(1)
Alternatives to Memoization
101(7)
Evangelism
108(1)
The Benefits of Speed
109(6)
Profiling and Performance Analysis
110(1)
Automatic Profiling
111(2)
Hooks
113(2)
Iterators
115(88)
Introduction
115(4)
Filehandles Are Iterators
115(2)
Iterators Are Objects
117(1)
Other Common Examples of Iterators
118(1)
Homemade Iterators
119(7)
A Trivial Iterator: upto()
121(1)
Syntactic Sugar for Manufacturing Iterators
122(1)
dir_walkO
123(1)
On Clever Inspirations
124(2)
Examples
126(31)
Permutations
128(7)
Genomic Sequence Generator
135(4)
Filehandle Iterators
139(1)
A Flat-File Database
140(4)
Improved Database
144(4)
Searching Databases Backwards
148(2)
A Query Package That Transforms Iterators
150(2)
An Iterator That Reads Files Backwards
152(1)
Putting It Together
152(1)
Random Number Generation
153(4)
Filters and Transforms
157(6)
imap()
158(2)
igrep()
160(1)
list_iterator()
161(1)
append()
162(1)
The Semipredicate Problem
163(14)
Avoiding the Problem
164(2)
Alternative undefs
166(3)
Rewriting Utilities
169(1)
Iterators That Return Multiple Values
170(1)
Explicit Exhaustion Function
171(2)
Four-Operation Iterators
173(3)
Iterator Methods
176(1)
Alternative Interfaces to Iterators
177(10)
Using foreach to Loop Over More Than One Array
177(5)
An Iterator with an each-Like Interface
182(2)
Tied Variable Interfaces
184(1)
Summary of tie
184(1)
Tied Scalars
185(1)
Tied Filehandles
186(1)
An Extended Example: Web Spiders
187(16)
Pursuing Only Interesting Links
190(2)
Referring URLs
192(5)
robots.txt
197(3)
Summary
200(3)
From Recursion to Iterators
203(52)
The Partition Problem Revisited
204(11)
Finding All Possible Partitions
206(3)
Optimizations
209(3)
Variations
212(3)
How to Convert a Recursive Function to an Iterator
215(10)
A Generic Search Iterator
225(4)
Other General Techniques For Eliminating Recursion
229(26)
Tail-Call Elimination
229(5)
Someone Else's Problem
234(5)
Creating Tail Calls
239(3)
Explicit Stacks
242(1)
Eliminating Recursion From fib()
243(12)
Infinite Streams
255(70)
Linked Lists
256(1)
Lazy Linked Lists
257(6)
A Trivial Stream: upto()
259(1)
Utilities for Streams
260(3)
Recursive Streams
263(6)
Memoizing Streams
265(4)
The Hamming Problem
269(3)
Regex String Generation
272(28)
Generating Strings in Order
283(3)
Regex Matching
286(2)
Cutsorting
288(5)
Log Files
293(7)
The Newton-Raphson Method
300(13)
Approximation Streams
304(1)
Derivatives
305(3)
The Tortoise and the Hare
308(2)
Finance
310(3)
Power Series
313(12)
Derivatives
319(1)
Other Functions
320(1)
Symbolic Computation
320(5)
Higher-Order Functions and Currying
325(34)
Currying
325(8)
Common Higher-Order Functions
333(10)
Automatic Currying
335(2)
Prototypes
337(1)
Prototype Problems
338(2)
More Currying
340(2)
Yet More Currying
342(1)
reduce() and combine()
343(8)
Boolean Operators
348(3)
Databases
351(8)
Operator Overloading
356(3)
Parsing
359(112)
Lexers
359(17)
Emulating the <> Operator
360(5)
Lexers More Generally
365(3)
Chained Lexers
368(6)
Peeking
374(2)
Parsing in General
376(8)
Grammars
376(4)
Parsing Grammars
380(4)
Recursive-Descent Parsers
384(6)
Very Simple Parsers
384(2)
Parser Operators
386(2)
Compound Operators
388(2)
Arithmetic Expressions
390(45)
A Calculator
400(1)
Left Recursion
400(8)
A Variation on star()
408(4)
Generic-Operator Parsers
412(3)
Debugging
415(9)
The Finished Calculator
424(3)
Error Diagnosis and Recovery
427(1)
Error-Recovery Parsers
427(3)
Exceptions
430(5)
Big Numbers
435(1)
Parsing Regexes
435(5)
Outlines
440(8)
Database-Query Parsing
448(8)
The Lexer
448(3)
The Parser
451(5)
Backtracking Parsers
456(9)
Continuations
457(4)
Parse Streams
461(4)
Overloading
465(6)
Declarative Programming
471(94)
Constraint Systems
472(1)
Local Propagation Networks
472(16)
Implementing a Local Propagation Network
475(12)
Problems with Local Propagation
487(1)
Linear Equations
488(2)
linogram: A Drawing System
490(73)
Equations
500(1)
ref ($base) | | $base
501(1)
Solving Equations
502(10)
Constraints
512(2)
Values
514(2)
Constant Values
516(2)
Tuple Values
518(2)
Feature Values
520(1)
Intrinsic Constraints
521(1)
Synthetic Constraints
522(5)
Feature-Value Methods
527(3)
Feature Types
530(1)
Scalar Types
531(1)
Type Methods
532(7)
The Parser
539(2)
Parser Extensions
541(1)
%Types
542(1)
Programs
543(1)
Definitions
543(2)
Declarations
545(9)
Expressions
554(6)
Missing Features
560(3)
Conclusion
563(2)
Index 565(10)
Function Index 575

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program