100% found this document useful (1 vote)
6 views

Functional Python Programming: Use a functional approach to write succinct, expressive, and efficient Python code, 3rd Edition Lott pdf download

The document provides information about the book 'Functional Python Programming, 3rd Edition' by Steven F. Lott, which focuses on using a functional programming approach to write efficient and expressive Python code. It includes various resources and links for downloading related Python programming books and emphasizes the versatility of Python for both object-oriented and functional programming styles. The book is aimed at readers already familiar with Python and introduces essential functional programming concepts and techniques.

Uploaded by

mussidzealsp5
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
6 views

Functional Python Programming: Use a functional approach to write succinct, expressive, and efficient Python code, 3rd Edition Lott pdf download

The document provides information about the book 'Functional Python Programming, 3rd Edition' by Steven F. Lott, which focuses on using a functional programming approach to write efficient and expressive Python code. It includes various resources and links for downloading related Python programming books and emphasizes the versatility of Python for both object-oriented and functional programming styles. The book is aimed at readers already familiar with Python and introduces essential functional programming concepts and techniques.

Uploaded by

mussidzealsp5
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 68

Functional Python Programming: Use a functional

approach to write succinct, expressive, and


efficient Python code, 3rd Edition Lott download

https://textbookfull.com/product/functional-python-programming-
use-a-functional-approach-to-write-succinct-expressive-and-
efficient-python-code-3rd-edition-lott/

Download more ebook from https://textbookfull.com


We believe these products will be a great fit for you. Click
the link to download now, or visit textbookfull.com
to discover even more!

Biota Grow 2C gather 2C cook Loucas

https://textbookfull.com/product/biota-grow-2c-gather-2c-cook-
loucas/

Learn Python Programming A beginner s guide to learning


the fundamentals of Python language to write efficient
high quality code Romano

https://textbookfull.com/product/learn-python-programming-a-
beginner-s-guide-to-learning-the-fundamentals-of-python-language-
to-write-efficient-high-quality-code-romano/

Functional Python Programming Discover the power of


functional programming generator functions lazy
evaluation the built in itertools library and monads
2nd Edition Steven F. Lott
https://textbookfull.com/product/functional-python-programming-
discover-the-power-of-functional-programming-generator-functions-
lazy-evaluation-the-built-in-itertools-library-and-monads-2nd-
edition-steven-f-lott/

Functional Programming in C#: How to write better C#


code 1st Edition Enrico Buonanno

https://textbookfull.com/product/functional-programming-in-c-how-
to-write-better-c-code-1st-edition-enrico-buonanno/
Function Python programming discover the power of
functional programming generator functions lazy
evaluation the built in itertools library and monads
Second Edition Lott
https://textbookfull.com/product/function-python-programming-
discover-the-power-of-functional-programming-generator-functions-
lazy-evaluation-the-built-in-itertools-library-and-monads-second-
edition-lott/

A Functional Approach to Java: Augmenting Object-


Oriented Java Code with Functional Principles 1st
Edition Ben Weidig

https://textbookfull.com/product/a-functional-approach-to-java-
augmenting-object-oriented-java-code-with-functional-
principles-1st-edition-ben-weidig/

Python Projects for Beginners: A Ten-Week Bootcamp


Approach to Python Programming Milliken

https://textbookfull.com/product/python-projects-for-beginners-a-
ten-week-bootcamp-approach-to-python-programming-milliken/

Teach Your Kids to Code A Parent Friendly Guide to


Python Programming 1st Edition Bryson Payne

https://textbookfull.com/product/teach-your-kids-to-code-a-
parent-friendly-guide-to-python-programming-1st-edition-bryson-
payne/

Effective Python 90 Specific Ways to Write Better


Python 2nd Edition Brett Slatkin

https://textbookfull.com/product/effective-python-90-specific-
ways-to-write-better-python-2nd-edition-brett-slatkin/
Functional Python
Programming
Third Edition

Use a functional approach to write succinct,


expressive, and efficient Python code

Steven F. Lott

BIRMINGHAM—MUMBAI
“Python” and the Python logo are trademarks of the Python Software Foundation.
Functional Python Programming
Third Edition
Copyright © 2022 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 or its dealers and distributors, will be held
liable for any damages caused or alleged to have been 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.

Senior Publishing Product Manager: Denim Pinto


Acquisition Editor – Peer Reviews: Gaurav Gavas
Project Editor: Parvathy Nair
Development Editor: Lucy Wan
Copy Editor: Safis Editing
Technical Editor: Karan Sonawane
Indexer: Hemangini Bari
Proofreader: Safis Editing
Presentation Designer: Sandip Tadge

First published: January 2015


Second edition: April 2018
Third edition: December 2022

Production reference: 1221222


Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-80323-257-7
www.packt.com
Foreword

Python is an incredibly versatile language that offers a lot of perks for just about every
group. For the object-oriented programming fans, it has classes and inheritance. When
we talk about functional programming, it has functions as a first-class type, higher-order
functions such as map and reduce, and a handy syntax for comprehensions and generators.
Perhaps best of all, it doesn’t force any of those on the user – it’s still totally OK to write a
script in Python without a single class or function and not feel guilty about it.

Thinking in terms of functional programming, having in mind the goals of minimizing state
and side effects, writing pure functions, reducing intermediary data, and what depends on
what else will also allow you to see your code under a new light. It’ll also allow you to
write more compact, performant, testable, and maintainable code, where instead of writing
a program to solve your problem, you “write the language up”, adding new functions to
it until expressing the solution you designed is simple and straightforward. This is an
extremely powerful mind shift – and an exercise worth doing. It’s a bit like learning a
new language, such as Lisp or Forth (or German, or Irish), but without having to leave the
comfort of your Python environment.

Not being a pure functional language has its costs, however. Python lacks many features
functional languages can use to provide better memory efficiency and speed. Python’s
strongest point remains its accessibility – you can fire up your Python interpreter and
start playing with the examples in this book right away. This interactive approach allows
exploratory programming, where you test ideas easily, and only later need to incorporate
them into a more complex program (or not – like I said, it’s totally OK to write a simple
script).

This book is intended for people already familiar with Python. You don’t need to know
much about functional programming – the book will guide you through many common
approaches, techniques, and patterns used in functional programming and how they can
be best expressed in Python. Think of this book as an introduction – it’ll give you the basic
tools to see, think, and express your ideas in functional terms using Python.

Ricardo Bánffy

Software Engineer, Architect, Evangelist, and Passionate Pythonista


Contributors

About the author


Steven F. Lott has been programming since computers were large, expensive, and rare.
Working for decades in high tech has given him exposure to a lot of ideas and techniques;
some are bad, but most are useful and helpful to others.

Steven has been working with Python since the ‘90s, building a variety of tools and
applications. He’s written a number of titles for Packt Publishing, include Mastering
Object-Oriented Python, Modern Python Cookbook, and Functional Python Programming.

He’s a technomad, and lives on a boat that’s usually located on the east coast of the US. He
tries to live by the words, “Don’t come home until you have a story.”
About the reviewers
Alex Martelli is a Fellow of the Python Software Foundation, a winner of the Frank
Willison Memorial Award for contributions to the Python community, and a top-page
reputation hog on Stack Overflow. He spent 8 years with IBM Research, then 13 years
at Think3 Inc., followed by 4 years as a consultant, and lately 17 years at Google. He
has taught programming languages, development methods, and numerical computing at
Ferrara University and other venues.

Books he has authored or co-authored include two editions of Python Cookbook, four
editions of Python in a Nutshell, and a chapter in Beautiful Teams. Dozens of his interviews
and tech talks at conferences are available on YouTube. Alex’s proudest achievement are
the articles that appeared in Bridge World (January and February 2000), which were hailed
as giant steps towards solving issues that had haunted contract bridge theoreticians for
decades, and still get quoted in current bridge-theoretical literature.

Tiago Antao has a BEng in Informatics and a PhD in Life Sciences. He works in the
Big Data space, analyzing very large datasets and implementing complex data processing
algorithms. He leverages Python with all its libraries to carry out scientific computing and
data engineering tasks. He also uses low-level programming languages like C, C++, and
Rust to optimize critical parts of algorithms. Tiago develops on an infrastructure based on
AWS, but has used on-premises computing and scientific clusters for most of his career.

While he currently works in industry, he also has exposure to the academic side of scientific
computing, with two data analysis postdocs at the universities of Cambridge and Oxford,
and a research scientist position at the University of Montana, where he set up, from
scratch, the scientific computing infrastructure for the analysis of biological data.

He is one of the co-authors of Biopython, a major bioinformatics package written in Python.


He wrote Bioinformatics with Python Cookbook, which is on its third edition. He has also
authored and co-authored many high-impact scientific articles in the field of bioinformatics.
Join our community Discord space
Join our Python Discord workspace to discuss and know more about the book:
https://packt.link/dHrHU
Table of Contents

Preface xxi

Chapter 1: Understanding Functional Programming 1

The functional style of programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3


Comparing and contrasting procedural and functional styles . . . . . . . . . . . . . . . . . . . . . 4
Using the functional paradigm • 5
Using a functional hybrid • 8
The stack of turtles • 9
A classic example of functional programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Exploratory data analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Convert an imperative algorithm to functional code • 18
Convert step-wise computation to functional code • 18
Revise the sqrt() function • 20
Data cleansing steps • 20
(Advanced) Optimize this functional code • 23

Chapter 2: Introducing Essential Functional Concepts 25

Functions as first-class objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26


Pure functions • 27
Higher-order functions • 29
Immutable data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Strict and non-strict evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Lazy and eager evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Recursion instead of an explicit loop state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Functional type systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Familiar territory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Learning some advanced concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Apply map() to a sequence of values • 44
Function vs. lambda design question • 45
Optimize a recursion • 45

Chapter 3: Functions, Iterators, and Generators 47

Writing pure functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48


Functions as first-class objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Using strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Using tuples and named tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Using generator expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Exploring the limitations of generators • 63
Combining generator expressions • 65
Cleaning raw data with generator functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Applying generators to built-in collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Generators for lists, dicts, and sets • 69
Using stateful mappings • 73
Using the bisect module to create a mapping • 76
Using stateful sets • 78
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Rewrite the some_function() function • 79
Alternative Mersenne class definition • 80
Alternative algorithm implementations • 81
Map and filter • 82
Dictionary comprehension • 82
Raw data cleanup • 82

Chapter 4: Working with Collections 85

An overview of function varieties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86


Working with iterables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Parsing an XML file • 89
Parsing a file at a higher level • 92
Pairing up items from a sequence • 95
Using the iter() function explicitly • 98
Extending an iteration • 100
Applying generator expressions to scalar functions • 104
Using any() and all() as reductions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Using len() and sum() on collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Using sums and counts for statistics • 111
Using zip() to structure and flatten sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Unzipping a zipped sequence • 117
Flattening sequences • 118
Structuring flat sequences • 120
Structuring flat sequences – an alternative approach • 124
Using sorted() and reversed() to change the order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Using enumerate() to include a sequence number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Palindromic numbers • 129
Hands of cards • 130
Replace legs() with pairwise() • 131
Expand legs() to include processing • 132

Chapter 5: Higher-Order Functions 133

Using max() and min() to find extrema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134


Using Python lambda forms • 138
Lambdas and the lambda calculus • 140
Using the map() function to apply a function to a collection . . . . . . . . . . . . . . . . . . . . . . 141
Working with lambda forms and map() • 143
Using map() with multiple sequences • 144
Using the filter() function to pass or reject data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Using filter() to identify outliers • 149
The iter() function with a sentinel value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Using sorted() to put data in order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Overview of writing higher-order functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Writing higher-order mappings and filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Unwrapping data while mapping • 156
Wrapping additional data while mapping • 159
Flattening data while mapping • 161
Structuring data while filtering • 164
Building higher-order functions with callables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Assuring good functional design • 168
Review of some design patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Classification of state • 173
Classification of state, Part II • 174
Optimizing a file parser • 175
Chapter 6: Recursions and Reductions 177

Simple numerical recursions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178


Implementing manual tail-call optimization • 180
Leaving recursion in place • 181
Handling difficult tail-call optimization • 182
Processing collections through recursion • 184
Tail-call optimization for collections • 185
Using the assignment (sometimes called the “walrus”) operator in recursions • 187
Reductions and folding a collection from many items to one . . . . . . . . . . . . . . . . . . . . . . 188
Tail-call optimization using deques • 190
Group-by reduction from many items to fewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Building a mapping with Counter • 195
Building a mapping by sorting • 196
Grouping or partitioning data by key values • 198
Writing more general group-by reductions • 203
Writing higher-order reductions • 205
Writing file parsers • 207
Parsing CSV files • 211
Parsing plain text files with headers • 214
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Multiple recursion and caching • 219
Refactor the all_print() function • 219
Parsing CSV files • 219
Classification of state, Part III • 220
Diesel engine data • 220

Chapter 7: Complex Stateless Objects 223

Using tuples to collect data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224


Using NamedTuple to collect data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Using frozen dataclasses to collect data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Complicated object initialization and property computations . . . . . . . . . . . . . . . . . . . . . 237
Using pyrsistent to collect data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Avoiding stateful classes by using families of tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Computing Spearman’s rank-order correlation • 252
Polymorphism and type pattern matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Frozen dictionaries • 263
Dictionary-like sequences • 264
Revise the rank_xy() function to use native types • 265
Revise the rank_corr() function • 265
Revise the legs() function to use pyrsistent • 265

Chapter 8: The Itertools Module 267

Working with the infinite iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269


Counting with count() • 269
Counting with float arguments • 271
Re-iterating a cycle with cycle() • 275
Using cycle() for data sampling • 276
Repeating a single value with repeat() • 278
Using the finite iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Assigning numbers with enumerate() • 281
Running totals with accumulate() • 284
Combining iterators with chain() • 286
Partitioning an iterator with groupby() • 287
Merging iterables with zip_longest() and zip() • 290
Creating pairs with pairwise()) • 290
Filtering with compress() • 291
Picking subsets with islice() • 293
Stateful filtering with dropwhile() and takewhile() • 295
Two approaches to filtering with filterfalse() and filter() • 297
Applying a function to data via starmap() and map() • 298
Cloning iterators with tee() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
The itertools recipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Optimize the find_first() function • 306
Compare Chapter 4 with the itertools.pairwise() recipe • 306
Compare Chapter 4 with itertools.tee() recipe • 307
Splitting a dataset for training and testing purposes • 307
Rank ordering • 307

Chapter 9: Itertools for Combinatorics – Permutations and Combina-


tions 309

Enumerating the Cartesian product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310


Reducing a product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Computing distances • 314
Getting all pixels and all colors • 318
Performance improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Rearranging the problem • 323
Combining two transformations • 324
Permuting a collection of values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Generating all combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Combinations with replacement • 333
Recipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Alternative distance computations • 336
Actual domain of pixel color values • 338
Cribbage hand scoring • 339

Chapter 10: The Functools Module 343

Function tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344


Memoizing previous results with cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
Defining classes with total ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Applying partial arguments with partial() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Reducing sets of data with the reduce() function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Combining map() and reduce() • 356
Using the reduce() and partial() functions • 358
Using the map() and reduce() functions to sanitize raw data • 360
Using the groupby() and reduce() functions • 362
Avoiding problems with reduce() • 366
Handling multiple types with singledispatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Compare string.join() and reduce() • 370
Extend the comma_fix() function • 370
Revise the clean_sum() function • 371

Chapter 11: The Toolz Package 373

The itertools star map function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374


Reducing with operator module functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Using the toolz package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Some itertoolz functions • 379
Some dicttoolz functions • 385
Some functoolz functions • 386
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Replace true division with a fraction • 391
Color file parsing • 391
Anscombe’s quartet parsing • 392
Waypoint computations • 393
Waypoint geofence • 393
Callable object for the row_counter() function • 394

Chapter 12: Decorator Design Techniques 397

Decorators as higher-order functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398


Using the functools update_wrapper() function • 403
Cross-cutting concerns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Composite design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
Preprocessing bad data • 407
Adding a parameter to a decorator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
Implementing more complex decorators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
Complicated design considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
Datetime conversions • 421
Optimize a decorator • 423
None-tolerant functions • 423
Logging • 424
Dry-run check • 425

Chapter 13: The PyMonad Library 427

Downloading and installing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428


Functional composition and currying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
Using curried higher-order functions • 431
Functional composition with PyMonad • 432
Functors – making everything a function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
Using the lazy ListMonad() monad • 436
Monad bind() function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
Implementing simulation with monads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
Additional PyMonad features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
Revise the arctangent series • 449
Statistical computations • 450
Data validation • 450
Multiple models • 451

Chapter 14: The Multiprocessing, Threading, and Concurrent.Futures


Modules 453

Functional programming and concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454


What concurrency really means . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
The boundary conditions • 455
Sharing resources with process or threads • 456
Where benefits will accrue • 457
Using multiprocessing pools and tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Processing many large files • 460
Parsing log files – gathering the rows • 462
Parsing log lines into named tuples • 463
Parsing additional fields of an Access object • 467
Filtering the access details • 471
Analyzing the access details • 472
The complete analysis process • 473
Using a multiprocessing pool for concurrent processing . . . . . . . . . . . . . . . . . . . . . . . . . . 474
Using apply() to make a single request • 478
More complex multiprocessing architectures • 479
Using the concurrent.futures module • 479
Using concurrent.futures thread pools • 480
Using the threading and queue modules • 481
Using async functions • 482
Designing concurrent processing • 483
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
Lazy parsing • 487
Filter access path details • 488
Add @cache decorators • 489
Create sample data • 489
Change the pipeline structure • 490

Chapter 15: A Functional Approach to Web Services 491

The HTTP request-response model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492


Injecting state through cookies • 495
Considering a server with a functional design • 496
Looking more deeply into the functional view • 497
Nesting the services • 498
The WSGI standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
Raising exceptions during WSGI processing • 503
Pragmatic web applications • 505
Defining web services as functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
Flask application processing • 508
The data access tier • 513
Applying a filter • 515
Serializing the results • 516
Serializing data with JSON or CSV formats • 518
Serializing data with XML and HTML • 519
Tracking usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
WSGI application: welcome • 524
WSGI application: demo • 524
Serializing data with XML • 525
Serializing data with HTML • 525

Other Books You Might Enjoy 52

Index 53
Preface

Functional programming offers a variety of techniques for creating succinct and expressive
software. While Python is not a purely functional programming language, we can do a
great deal of functional programming in Python.

Python has a core set of functional programming features. This lets us borrow many design
patterns and techniques from other functional languages. These borrowed concepts can
lead us to create elegant programs. Python’s generator expressions, in particular, negate
the need to create large in-memory data structures, leading to programs that may execute
more quickly because they use fewer resources.

We can’t easily create purely functional programs in Python. Python lacks a number of
features that would be required for this. We don’t have unlimited recursion, for example,
we don’t have lazy evaluation of all expressions, and we don’t have an optimizing compiler.

There are several key features of functional programming languages that are available
in Python. One of the most important ones is the idea of functions being first-class ob-
jects. Python also offers a number of higher-order functions. The built-in map(), filter(),
and functools.reduce() functions are widely used in this role, and less obvious are
functions such as sorted(), min(), and max().

In some cases, a functional approach to a problem will also lead to extremely high-
performance algorithms. Python makes it too easy to create large intermediate data
structures, tying up memory (and processor time). With functional programming de-
sign patterns, we can often replace large lists with generator expressions that are equally
expressive but take up much less memory and run much more quickly.
xxii Preface

We’ll look at the core features of functional programming from a Python point of view.
Our objective is to borrow good ideas from functional programming languages and use
those ideas to create expressive and succinct applications in Python.

Who this book is for


This book is for more experienced programmers who want to create succinct, expressive
Python programs by borrowing techniques and design patterns from functional program-
ming languages. Some algorithms can be expressed elegantly in a functional style; we
can—and should—adapt this to make Python programs more readable and maintainable.

This is not intended as a tutorial on Python. This book assumes some familiarity with the
language and the standard library. For a foundational introduction to Python, consider
Learn Python Programming, Third Edition: https://www.packtpub.com/product/learn-p
ython-programming-third-edition/9781801815093.

While we cover the foundations of functional programming, this is not a complete review of
the various kinds of functional programming techniques. Having an exposure to functional
programming in another language can be helpful.

What this book covers


We can decompose this book into two general kinds of topics:

• Essentials of functional programming in Python. This is the content of Chapters 1


through 7.

• Library modules to help create functional programs. This is the subject of the
remaining chapters of the book. Chapter 12 includes both fundamental language and
library topics.

Chapter 1, Understanding Functional Programming, introduces some of the techniques that


characterize functional programming. We’ll identify some of the ways to map those features
to Python. We’ll also address some ways that the benefits of functional programming accrue
when we use these design patterns to build Python applications.
Preface xxiii

Chapter 2, Introducing Essential Functional Concepts, delves into central features of the
functional programming paradigm. We’ll look at each in some detail to see how they’re
implemented in Python. We’ll also point out some features of functional languages that
don’t apply well to Python. In particular, many functional languages have complex type-
matching rules required to support compiling and optimizing.

Chapter 3, Functions, Iterators, and Generators, will show how to leverage immutable Python
objects, and how generator expressions adapt functional programming concepts to the
Python language. We’ll look at some of the built-in Python collections and how we can
leverage them without departing too far from functional programming concepts.

Chapter 4, Working with Collections, shows how you can use a number of built-in Python
functions to operate on collections of data. This chapter will focus on a number of relatively
simple functions, such as any() and all(), which reduce a collection of values to a single
result.

Chapter 5, Higher-Order Functions, examines the commonly used higher-order functions


such as map() and filter(). It also shows a number of other higher-order functions as
well as how we can create our own functions that work with functions or return functions.

Chapter 6, Recursions and Reductions, teaches how to design an algorithm using recursion
and then optimize it into a high-performance for statement. We’ll also look at some other
reductions that are widely used, including collections.Counter().

Chapter 7, Complex Stateless Objects, showcases a number of ways that we can use immutable
tuples, typing.NamedTuple, and the frozen @dataclass instead of stateful objects. We’ll
also look at the pyrsistent module as a way to create immutable objects. Immutable
objects have a simpler interface than stateful objects: we never have to worry about
abusing an attribute and setting an object into some inconsistent or invalid state.

Chapter 8, The Itertools Module, examines a number of functions in the itertools standard
library module. This collection of functions simplifies writing programs that deal with
collections or generator functions.
xxiv Preface

Chapter 9, Itertools for Combinatorics – Permutations and Combinations, covers the combina-
toric functions in the itertools module. These functions are more specialized than those
in the previous chapter. This chapter includes some examples that illustrate ill-considered
use of these functions and the consequences of combinatoric explosion.

Chapter 10, The Functools Module, focuses on how to use some of the functions in the
functools module for functional programming. A few functions in this module are more
appropriate for building decorators, and they are left for Chapter 12, Decorator Design
Techniques.

Chapter 11, The Toolz Package, covers the toolz package, a number of closely related
modules that help us write functional programs in Python. The toolz modules parallel
the built-in itertools and functools modules, providing alternatives that are often more
sophisticated and make better use of curried functions.

Chapter 12, Decorator Design Techniques, covers how we can look at a decorator as a way
to build a composite function. While there is considerable flexibility here, there are also
some conceptual limitations: we’ll look at ways that overly complex decorators can become
confusing rather than helpful.

Chapter 13, The PyMonad Library, examines some of the features of the PyMonad library.
This provides some additional functional programming features. It also provides a way to
learn more about monads. In some functional languages, monads are an important way to
force a particular order for operations that might get optimized into an undesirable order.
Since Python already has strict ordering of expressions and statements, the monad feature
is more instructive than practical.

Chapter 14, The Multiprocessing, Threading, and Concurrent.Futures Modules, points out
an important consequence of good functional design: we can distribute the processing
workload. Using immutable objects means that we can’t corrupt an object because of poorly
synchronized write operations.

Chapter 15, A Functional Approach to Web Services, shows how we can think of web services
as a nested collection of functions that transform a request into a reply. We’ll see ways to
Preface xxv

leverage functional programming concepts for building responsive, dynamic web content.

Chapter 16, A Chi-Squared Case Study, is a bonus, online-only case study applying a number
of functional programming techniques to a specific exploratory data analysis problem. We
will apply a 𝜒 2 statistical test to some complex data to see if the results show ordinary
variability, or if they are an indication of something that requires deeper analysis. You can
find the case study here: https://github.com/PacktPublishing/Functional-Python-P
rogramming-3rd-Edition/blob/main/Bonus_Content/Chapter_16.pdf.

To get the most out of this book


This book presumes some familiarity with Python 3 and general concepts of application
development. We won’t look deeply at subtle or complex features of Python; we’ll avoid
much consideration of the internals of the language.

Some of the examples use exploratory data analysis (EDA) as a problem domain to show
the value of functional programming. Some familiarity with basic probability and statistics
will help with this. There are only a few examples that move into more serious data science.

Python 3.10 is required. The examples have also been tested with Python 3.11, and work
correctly. For data science purposes, it’s often helpful to start with the conda tool to create
and manage virtual environments. It’s not required, however, and readers should be able
to use any available Python.

Additional packages are generally installed with pip. The command looks like this:

% python -m pip install toolz pymonad pyrsistent beautifulsoup4

Complete the exercises


Each chapter includes a number of exercises that help the reader apply the concepts in the
chapter to real code. Most of the exercises are based on code available from the book’s
repository on GitHub: https://github.com/PacktPublishing/Functional-Python-Pro
gramming-3rd-Edition.
xxvi Preface

In some cases, the reader will notice that the code provided on GitHub includes partial
solutions to some of the exercises. These serve as hints, allowing the reader to explore
alternative solutions.

In many cases, exercises will need unit test cases to confirm they actually solve the problem.
These are often identical to the unit test cases already provided in the GitHub repository.
The reader should replace the book’s example function name with their own solution to
confirm that it works.

In some cases, the exercises suggest writing a response document to compare and contrast
multiple solutions. It helps to find a mentor or expert who can help the reader by reviewing
these small documents for clarity and completeness. A good comparison between design
approaches will include performance measurements using the timeit module to show the
performance advantages of one design over another.

Download the example code files


The code bundle for the book is hosted on GitHub at https://github.com/PacktPublis
hing/Functional-Python-Programming-3rd-Edition. We also have other code bundles
from our rich catalog of books and videos available at https://github.com/PacktPublis
hing/. Check them out!

Download the color images


We also provide a PDF file that has color images of the screenshots/diagrams used in this
book. You can download it here: https://packt.link/OV1CB.

Conventions used
There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in the text, database table names, folder names, filenames,
file extensions, pathnames, dummy URLs, user input, and Twitter handles. For example:
“Python has other statements, such as global or nonlocal, which modify the rules for
variables in a particular namespace.”
Preface xxvii

Bold: Indicates a new term, an important word, or words you see on the screen, such as in
menus or dialog boxes. For example: “The base case states that the sum of a zero-length
sequence is 0. The recursive case states that the sum of a sequence is the first value plus
the sum of the rest of the sequence.”

A block of code is set as follows:

print("Hello, World!")

Any command-line input or output is written as follows:

% conda create -n functional3 python=3.10

Warnings or important notes appear like this.

Tips and tricks appear like this.

Get in touch
Feedback from our readers is always welcome.

General feedback: Email [email protected], and mention the book’s title in the
subject of your message. If you have questions about any aspect of this book, please email
us at [email protected].

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes
do happen. If you have found a mistake in this book we would be grateful if you would
report this to us. Please visit https://subscription.packtpub.com/help, click on the
Submit Errata button, search for your book, and enter the details.

Piracy: If you come across any illegal copies of our works in any form on the Internet,
xxviii Preface

we would be grateful if you would provide us with the location address or website name.
Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have ex-
pertise in and you are interested in either writing or contributing to a book, please visit
http://authors.packtpub.com.

Share your thoughts


Once you’ve read Functional Python Programming, Third Edition, we’d love to hear your
thoughts! Scan the QR code below to go straight to the Amazon review page for this book
and share your feedback.

https://packt.link/r/1803232579

Your review is important to us and the tech community and will help us make sure we’re
delivering excellent quality content.
Random documents with unrelated
content Scribd suggests to you:
In the Unions and Incorporations marked "C" in the table, a
regulation to the following effect was in force at the end of 1847:—

"If any able-bodied male pauper shall apply to be set to work by


the parish, one-half at least of the relief which may be afforded
to him or to his family shall be in kind."

The following special regulations were in force at the end of 1847:—

Nottingham.—The Out-relief Rules contained in the early


Regulations Order were in special terms. A subsequent Order
suspended certain of those rules, and permitted outdoor relief
to able-bodied paupers, to "be given, as far as possible, in
return for piecework."
St. Pancras.—The rules directed that "in the case of any able-
bodied persons the guardians may, until accommodation can be
obtained for the reception of such persons in the workhouse,
give outdoor relief, one-half of which, at least, shall be in kind;
but such relief shall only be given in return for labour at task
work."
APPENDIX B[864]
EXTRACT FROM THE MINORITY REPORT FOR SCOTLAND,
GIVING THE REASONS IN FAVOUR OF THE COMPLETE
SUPERSESSION OF THE POOR LAW

We realise that the foregoing recommendations amount to the


complete supersession of the Poor Law, and, indeed, to its abolition.
In its stead, we propose merely an adequate enlargement of the
work already undertaken by the various existing public authorities
for the prevention of destitution—for the prevention of the
destitution due to neglected childhood by the Local Education
Authority; for the prevention of the destitution due to preventable
sickness, neglected infancy, or uncared-for infirmity by the Local
Health Authority; for the prevention of the destitution due to mental
defectiveness by the Local Lunacy Authority; for the prevention of
the destitution of Old Age by the Local Pension Authority; and for
the prevention of the destitution due to unemployment by the new
National Authority of which the beginning is seen in the Labour
Exchanges Act of 1909. We recommend, in fact, that the community
should cease to maintain a special organ for the mere relief of
destitution, however caused, and should make such relief as must be
given merely incidental to the deliberate prevention of destitution, to
which it has, by the creation of public authorities dealing with the
several causes of destitution, already set its hand. We now proceed
to summarise the main reasons for so radical a change of attitude
towards the problem of poverty, and incidentally to answer the more
important objections that have been made to it.
The Present Overlap and Duplication of Services in Respect of all
Sections of the Destitute
The first reason for dispensing with any special Authority for the
relief of destitution as such is a practical one. The work of the Poor
Law Authority has to-day been largely superseded, in every branch
of its duties, by the activities of the newer forms of Local
Government. We have already described, in our proposal for the
institution of a Common Register of Public Assistance, and the
appointment of a Registrar, the beginnings in Scotland of the same
costly overlap of services and duplication of work which have, in
England, already reached extravagant proportions. Thus, whereas in
1845, and for some years afterwards, all the public assistance
afforded to the sick poor was included in the Poor Law
administration, there has gradually been built up, out of the rates, a
second medical service, the Public Health department of the County
or Burgh. This Public Health Department—in the Highlands, in the
Hebrides, and in some of the rural districts still only rudimentary—
has, in the large towns, already its own series of hospitals in which
the sick poor are maintained as well as treated, entirely free of
charge, yet without being paupers. To the long list of diseases
already treated in these municipal hospitals, there has now been
added phthisis, an illness which accounts for a large proportion of
the sick at present dealt with by the Poor Law Authorities. With
regard to the children, we see, more or less competing with the Poor
Law for their care, on the one hand the Industrial Schools so largely
maintained out of the rates and taxes, and on the other the School
Boards with the new powers conferred on them by the Education
(Scotland) Act of 1908 in connection with the provision of meals and
medical inspection. With regard to the aged, we have since 1908 in
every County and Burgh a Local Pension Committee awarding
domiciliary pensions to no fewer than 70,000 persons over 70, or
more than treble the number of aged persons maintained by the
Parish Councils as Poor Law Authorities, many, indeed, having been
saved from the pauper roll. The removal of the pauper
disqualification for a national pension, which has been definitely
announced as a subject for legislation in 1910, will make the overlap
still more remarkable. With regard to all the persons certifiable as of
unsound mind we have the District Boards of Lunacy providing
asylums for some, whilst the Parish Councils still deal with others in
the Poorhouses, as they do with the uncertified imbeciles, epileptics,
and feeble-minded. Finally, with regard to the able-bodied men in
distress, for whom the Scottish Poor Law professes not to provide
(but nevertheless, as we see, in practice does so as much as the
English Poor Law), we find growing up in a score of towns,
comprising half the population of Scotland, an organised system of
public assistance of one kind or another, under the Distress
Committees established by the Unemployed Workmen Act of 1905.
We see, in town after town, the vagrants, for whom the Parish
Council does not provide, relieved in one way or another by the
Police. Thus, there is not one section of the host of persons in
Scotland who are without the necessaries of life, of whom the Parish
Council, as the Poor Law Authority, is to-day left in undisturbed
possession. For the care of the children, the sick, the mentally
defective, the aged, and the able-bodied unemployed, Parliament
has set up, in Scotland as in England, specialised public authorities
which deal with the poor, not on account of their destitution, but in
respect of the cause or character of their need.
Fortunately, the overlap and confusion caused by these rival services
and competing Local Authorities have in Scotland not yet gone far. It
is still possible to prevent a waste of expenditure and a confusion of
functions that will certainly increase if the growing overlap is not
stopped. To us there seems to be but two lines of reform. We may,
on the one hand, ask Parliament to arrest the ever-increasing
activities of the Local Health Authorities, stop the provision of more
isolation hospitals, check the Health Visitors and the crusade against
infantile mortality, rescind the recent order of the Local Government
Board annexing to their sphere the whole range of tuberculosis, and
remit all the sick poor once more to the Parish Council and its
Poorhouse. We may propose to repeal the Unemployed Workmen
Act and the Old Age Pensions Act, and thrust back the unemployed
workmen and the aged into the Poor Law. We may recommend the
withdrawal of the new powers given to the School Boards in
connection with medical inspection and school meals for hungry
children. We may, in fact, propose to revert to the position in 1845,
when there was everywhere one Local Authority, and one Local
Authority only, to give public assistance to the necessitous poor. We
do not think such a course either desirable or politically practicable.
We do not believe that any Minister of the Crown will have the
hardihood to propose it; we do not believe that Scottish public
opinion will tolerate it; we do not believe that any House of
Commons will agree to it.
The other alternative seems to us to be, not to reverse but to
continue the evolution that has been going on in Local Government,
in Scotland as in England. Instead of seeking to curtail the work with
regard to children, the sick, the mentally defective, the aged and the
able-bodied unemployed, which is now being undertaken by the
Local Education Authorities, the Local Health Authorities, the Local
Lunacy Authorities, the Local Pension Authorities, and the Local
Unemployment Authorities, what we recommend is that the
remainder of each of these sections of the poor who are still being
looked after by the Poor Law Authorities should be transferred to the
newer specialised Authorities that have been created.
Just as it is proposed, by the Royal Commission on the Care and
Control of the Feeble-minded, with the concurrence of practically all
acquainted with the problem, to take the persons of unsound mind,
including the epileptic and the feeble-minded, quite "out of the Poor
Law," and place them entirely in the hands of the Local Lunacy
Authority, so it is suggested that all public care of the children of
school age should be "taken out of the Poor Law" and transferred to
the Local Education Authority; that all public care of the sick and
infirm (including the maternity cases, the infants under school age,
and the aged requiring institutional care) should be "taken out of the
Poor Law," and transferred to the Local Health Authority; and that all
the aged who can and will live decently on their pensions should be
"taken out of the Poor Law," and dealt with by the Pension
Committee—the whole under the control and direction of the Parish
School Board or the District Committee, or the County or Town
Council as the case may be. There would then remain, out of all the
pauper host, only the vagrants and the odds and ends of genuinely
able-bodied men who find their way to the Poorhouse. For these
who need help to find a situation if they are merely stranded by
temporary unemployment, detention colonies if they are idle or
vicious, and physical and industrial training if they have to be
maintained whilst waiting for a place, we recommend that there
should be a new authority of national scope—the government
department which is already being set up under the Labour
Exchanges Act of 1909, and which should also take over the work of
the Distress Committees under the Unemployed Workmen Act of
1905. We recommend, therefore, as the only practicable means of
preventing a wasteful and demoralising duplication of services, the
complete abolition, not only of the Poorhouse, but also of the Poor
Law itself.
The Expediency of Preventing the Occurrence of Destitution, rather
than merely Relieving it after it has Occurred.
What we propose is no mere change of names or of official
machinery. We think the time has come when the nation should
definitely adopt the principle of using all its powers to prevent the
occurrence of destitution, instead of the principle of merely relieving
it after it has occurred. Destitution, as we know, is a social disease,
as destructive to the health of the community as phthisis is; quite as
dangerous to the individual attacked, once it has gained a firm hold,
but fortunately as gradual as phthisis in its attack. The Poor Law
Authorities of Scotland have failed to prevent the occurrence of
destitution, or even to prevent pauperism, and have been unable to
provide what is required for the several sections of persons under
their charge, not because the Parish Councillors are incompetent or
dishonest, careless or corrupt, but because they have been set, not
to this task at all, but merely to that of "relieving destitution." They
do relieve destitution much more efficiently on the whole than ever
before; but we are not satisfied, nor do we think that public opinion
is now satisfied, with the spending in Scotland, year after year, more
than a million sterling in the relief of a destitution which never gets
either prevented or cured. What the nation now asks is that men,
women, and children should, by appropriate measures, be prevented
from sinking to a condition of destitution; and that such as
unavoidably fall into that state should be taken in hand with a view,
not merely to their relief, but to their effectual cure. This is work
which a Poor Law authority, by the very nature of its being, can
never perform effectively. Any Poor Law authority, call it by what
name you may, is necessarily confined to dealing with persons who
are actually "destitute" or actually "in distress"; it cannot reach out
to anticipate, at the incipient stage, what will, if not arrested in its
growth, eventually become destitution or distress. Similarly, a Poor
Law authority must necessarily find its operations restricted to the
period during which persons are "destitute" or "in distress," though it
is precisely some disciplinary "after care" which may be needed to
prevent a relapse. In short, except for the purpose of alleviating
momentary suffering (for which alone it was originally intended), the
money spent in the relief of the destitute, begun only when they are
destitute, and discontinued as soon as they cease to be destitute, is
simply wasted. If a hospital for the sick could, by the law of its
being, only admit cases when "gangrene" had already set in, and
had to discharge them the very moment that the "fever" had been
reduced, it would effect as few cures of the sick as the Poorhouse
does of the destitute. Yet no Poor Law authority, whatever its name,
can, in its treatment of the disease of destitution, transcend the
corresponding limits.
If we wish to prevent the very occurrence of destitution, and
effectively cure it when it occurs, we must look to its causes. Now,
deferring for the moment any question of human fallibility, or the
"double dose of original sin," which most of us are apt to ascribe to
those who succumb in the struggle, the investigations of this Royal
Commission reveal three broad roads along one or other of which
practically all paupers come, namely: (a) sickness, howsoever
caused, (b) neglected infancy and neglected childhood, whosoever
may be in fault, and (c) unemployment (including "under-
employment"), by whatsoever occasioned. If we could prevent
sickness, however caused, or effectually treat it when it occurs; if we
could ensure that no child, whatever its parentage, went without
what we may call the National Minimum of Nurture and Training;
and if we could provide that no able-bodied person was left to suffer
from long-continued or chronic unemployment, we should prevent at
least nine-tenths of the destitution that now costs the Poor Law
Authorities of Scotland more than a million per annum. To break up
the Poor Law, and to transfer its several services to the Local
Education, Health, Lunacy, and Pension Authorities, and to a national
authority for the able-bodied, is to hand over the task of treating
curatively the several sections of the destitute to authorities charged
with the prevention of the several causes of destitution from which
those sections are suffering. This means a systematic attempt to
arrest each of the principal causes of eventual destitution at the very
outset, in the most incipient stage of its attack, which is always an
attack of an individual human being, not of the family as a whole. It
is one person, at the outset, who has the cough of incipient phthisis,
not a whole family; though if no preventive force is brought to bear,
destitution will eventually set in and the whole family will be on our
hands. There may be in the family neglected infants, neglected
children, or feeble-minded persons lacking proper care or control,
who may not be technically destitute, who may even be dependents
of able-bodied men in work, but who, if left uncared for, will
inevitably become the destitute of subsequent years. Hence it is vital
that the Local Health Authority should be empowered and required
to search out and ensure proper treatment for the incipient stages of
all diseases. It is vital that the Lunacy Authority should be
empowered and required to search out and ensure proper care and
control for all persons certifiable as mentally defective, long before
the family to which they belong is reduced to destitution. It is vital
that the Local Education Authority should be empowered and
required to search out and ensure, quite irrespective of the family's
destitution, whatever Parliament may prescribe as the National
Minimum of nurture and training for all children, the neglect of which
will otherwise bring these children, when they grow up, themselves
to a state of destitution. It is becoming no less clear that some
Authority—we say a National Authority—must register and deal with
the man who is unemployed, long before extended unemployment
has demoralised him and reduced his family to destitution. We wish
to put the issue quite clearly before the public. The systematic
campaign for the prevention of the occurrence of destitution that we
propose—that the community should undertake by grappling with its
principal causes at the incipient stages, when they are just beginning
to affect one or other members of a family only, long before the
family as a whole has sunk into the morass of destitution—involves
treating the individual member who is affected in respect of the
cause of his complaint, even before he is "disabled" or in pecuniary
distress. It means a systematic searching out of incipient cases, just
as the Medical Officer of Health searches out infectious disease, or
the School Attendance Officer searches out children who are not on
the school roll, even before application is made.
At present, the Local Education Authorities, the Local Health
Authorities, and the Local Lunacy Authorities only feebly and
imperfectly grapple with their task of arresting the causes of
destitution in the child, the sick person, or the person of unsound
mind, partly because they have only lately begun this part of their
work, but principally because they have not been legally empowered
and legally required to do it. Moreover, they do not yet have forced
on their attention, as they would if they had to maintain those who
needed to be cured, the extent to which they fail to prevent. If the
Health Committee knew that it would have eventually to maintain
the sick men whom it allowed to sink gradually into phthisis, as it
has now practically to maintain persons who contract smallpox, it
would look with a different eye upon the Medical Officer of Health's
desire to "search out" every case of incipient phthisis whilst it is yet
curable, to press upon the ignorant sufferer the best hygienic advice,
and to do what is necessary in order to enable the insidious progress
of the disease to be arrested. This does not entail that all diseases
shall be treated free, any more than the Public Health supervision of
sanitation entails that bad landlords shall have their house drainage
provided at the public cost. All the increased activity of the Public
Health authorities in searching out and treating sickness may
coincide with a systematic enforcement of personal responsibility in
respect to personal hygiene and with regard to the maintenance in
health of dependents, which we, in fact, recommend. The break-up
of the Poor Law implies, in short, not only the adoption of a
systematic crusade against the several preventable causes of
destitution, but also a far more effective enforcement of parental
responsibility than is at present practicable.
It may, however, be objected that there are, at any rate, the families
to be dealt with which are now in a state of destitution; and that,
moreover, it must be anticipated, even with uniformly good
administration of the preventive services, there will not be a few
families who, as "missed cases," will have slipped into destitution,
without having had their descent arrested by the preventive action
above described. We think that each member of even such a family
requires, for restoration, specialised treatment according to his or
her need. The infant, the child of school age, the mentally defective,
the sick, the infirm or incapacitated, the boy or girl above school
age, and finally the able-bodied and able-minded adult, each
requires that something different should be done for him or her, if
that individual is to be properly dealt with. The alternative, namely,
to treat the family as a whole, means to place it in the General
Mixed Poorhouse, or merely to give it a dole of Outdoor Relief. This,
indeed, is to-day the dominant practice; and as such, has been
condemned by Majority and Minority alike. It must, we think, be
admitted that the several members of the family, with their very
different needs, cannot be wisely treated without calling in the public
authorities specialising on those heads, such as the Education,
Health, Lunacy, Pension, and Unemployment Authorities. This does
not mean that the needs of the other members of the family will
escape consideration. Assuming that the cause of the destitution in
which the family is plunged is the sickness of the breadwinner, and
that the other members of the family are all normal, the Health
Authority will, if he thinks domiciliary treatment desirable, not only
give the necessary medical attendance, and look after the whole
family environment by its Health Visitor, but, if there is no income,
will grant (subject to the statutory rules and the Council's own Bye-
laws) the home aliment that is requisite for the family maintenance.
Would any one suggest that the Health Committee, with its Medical
Officer and its Health Visitor, should be excluded from this case, or
that it should be precluded from treating the case at home when the
doctor reports that it can properly be so treated? If there is a
mentally defective person in such a family, ought the Lunacy
Authority to be kept out? If there are children of school age in it, is it
wise to prevent the intervention of the Education Authority and its
School Attendance Officer? We suggest that it is the business of the
officers of the County or Town Council—in particular the Registrar of
Public Assistance whom we have proposed—to see (a) that these
Authorities do not overlap, and (b) that they are all consulted as
regards such members of the family as come within their respective
spheres of treatment. We see no need for any general Poor Law or
"Public Assistance Committee" at all.
Thus there are two main reasons for the Scheme of Reform that we
propose. By breaking up the Poor Law into its component services,
and transferring each of these to the organ of government which is
already performing the same service for the population at large, we
(a) stop the present overlapping and confusion, (b) continue the
evolution which has been silently going on in Scotland for a whole
generation, and (c) introduce a logical order into both Central and
Local Government. But the scheme has a far larger and deeper
significance than any increase in administrative efficiency or any
promotion of economy and simplicity in Local Government. The
reform that we advocate, by emphasising everywhere the Principle
of Prevention, and especially by systematically searching out
neglected infancy and childhood, preventable sickness, uncontrolled
feeble-mindedness and uncared-for epilepsy, unwarded vagrancy
and that hopeless worklessness that is so demoralising to mind and
body, brings with it the sure and certain hope that we may, at no
distant date, by patient and persistent effort on these lines, remove
from our midst the intolerable infamy to a Christian and civilised
State of the persistence of a mass of chronic destitution, spreading
like a cancerous growth from one generation to another of our
fellow-citizens.
The "Moral Factor" in Destitution
Such being the grounds for our proposals, we have sought to weigh
and appreciate the various arguments that can be urged against
them. The most radical objection, and we infer the most deeply felt,
against the Supersession of the Poor Law Authority by the various
specialised and preventive Authorities that are already at work,
seems to be a conviction that, in proposing to treat the problem of
destitution as one of Sickness or Mental Defect, of Infirmity or Old
Age, of Unemployment or Neglected Childhood, we are ignoring the
"moral factor." It is alleged that, among all paupers, notwithstanding
the different roads by which they may have come to destitution,
there is a certain moral taint; and that, in view of the importance of
properly treating this defect of character, all paupers, whatever their
age or sex or physical or mental condition ought to be dealt with by
an authority specialising on this defect; and this, it is assumed, is
what the Poor Law Authority is, or should be made to become. In
order that we may be quite sure that we are stating this objection
fairly, we quote the exact words of the most accomplished opponent
of our proposals, Professor Bernard Bosanquet:—

"The antagonism cannot be put too strongly. The Majority


proceed upon the principle that where there is a failure of social
self-maintenance in the sense above defined, there is a defect in
the citizen character, or at least a grave danger to its integrity;
add that therefore every case of this kind raises a problem
which is "moral," in the sense of affecting the whole capacity of
self-management, to begin with, in the person who has failed,
and secondarily, in the whole community so far as influenced by
expectation and example. This relation to a man's whole
capacity for self-management, his "moral," is a distinctive
feature, I take it, which separates the treatment required by the
destitute or necessitous from anything that can be offered to
citizens who are maintaining themselves in a normal course of
life."[865]

In this cogent argument for the retention of the Category of the


Destitute, and of one Authority, and one Authority only, for all
classes of destitute persons, we see two distinct and separate
assumptions, one as to fact, and the other as to social expediency.
We have first the suggestion that, in all classes of persons who need
maintenance at the hands of the State, there is, as a matter of fact,
a moral defect, common to the whole class, and requiring specific
treatment. Secondly, we see creeping out from behind this
suggestion, a further assumption as to the policy which ought to be
pursued by the Poor Law Authority. This Authority, which is to have
in its charge all the heterogeneous population of infants, children,
sick and mentally defective persons, the aged and the infirm, the
widows, the vagrants, and the unemployed, is to treat them, not
with a single eye to what is best calculated to turn them, or any of
them, into efficient citizens, not even with a single eye to what will
most successfully remedy the "moral defect" which they are
assumed all to possess, but with the quite different object of
warning off or deterring, "by expectation and example," other
persons for applying for like treatment. In other words, we must, by
keeping all the different varieties of people who require State aid
under one Authority, and under one that assumes the existence of
this "moral defect," retain for all alike, not only the "stigma of
pauperism," but also a method of provision which will "deter" others
from coming to be treated. As this is the only philosophical argument
that we have encountered, by way of justification for the existence
of one Authority, and one Authority only, to which the State should
indiscriminately commit the care of the infants, the children of school
age, the sick, the mentally defective, the aged and infirm, the
vagrants and the unemployed workmen in distress, it requires
detailed examination.
Let us first examine the initial assumption that the miscellaneous
multitude who, year by year, come on public funds for maintenance,
are, as a matter of fact, one and all, characterised by a particular
moral defect—a feature so uniform, so important, and so specific as
to outweigh the differences between infants and adults, the healthy
and the sick, the sane and the mentally defective, the aged and the
able-bodied; and to require the aggregation of all of them together
under a single Authority in each locality, which should specialise
upon this common characteristic. We have, in the first place, to
realise that two-fifths of all the paupers are infants or children of
school age; that is to say, human beings rendered destitute, not by
any action or inaction of their own, but through something which
has happened to their parents or guardians. An enormous proportion
of these children are destitute merely because they are orphans.
What rational ground have we for assuming, without enquiry, that
these little ones are suffering from any "defect in the citizen
character," or from any "moral" defect whatsoever? Their fathers
may well have had defects, for they have died; though even with
regard to them the more obvious inference would seem to be that
they had physical defects or weaknesses; and this, in view of the
frequency of mere accident, cannot be deduced with any certainty.
We can, at any rate, infer nothing as to the character of the mothers
from the fact that the fathers have died. Moreover, even if we could
make the assumption that the children of fathers who have died
prematurely, or who from some other cause have left their offspring
without property, necessarily inherited some weakness of character
or specific moral defect, it does not seem to follow that the best way
of counteracting this inheritance would be to herd such children
together, to segregate them apart from normal children, to brand
them as paupers, and to commit them to the care of an Authority
not specially concerned with dealing with children as children, but
regarding children as only one variety of the pauper class. It seems
clear that the real justification for keeping together all the infants
and children whom the State has to maintain, and for excluding
them from the care of the Local Education Authority, is not any
consideration of what is likely to be best for such children—not even
what is best calculated to counteract any disadvantageous
tendencies that some of them may have inherited—but the second
assumption to which we drew attention, namely, that it is expedient
so to treat those whom the State must maintain that other persons
will not, "by expectation and example," be led to apply for similar
treatment. The argument, in short, is really one for affixing the
"stigma of pauperism" to all the children that the State has to
maintain, not because this will make them grow up into efficient
citizens—even, perhaps, at the cost of injuriously affecting their
education and their character—but in order merely to prevent other
children becoming chargeable. This policy of definitely "Poor Law
treatment" for the Children of the State, the Scottish Parish Councils,
to their honour, have always repudiated. But if this policy of "Poor
Law treatment" of the child is repudiated—if the State is really to set
itself to bring up the boys and girls whom it finds on its hands with a
single eye to their development into efficient citizens—why should
the State not use for them the organ which it has fashioned for this
very purpose? What ground is there for treating the child as a
pauper at all, when the Local Education Authority stands there, in
every parish, already authorised by law to provide all that is
requisite, and prepared to treat the child simply as a child?
Passing from the two-fifths of the paupers who are infants or
children, we have then to realise that something like another two-
fifths of all those who, in Scotland, apply for maintenance are not
merely "disabled" in the technical sense, but are definitely suffering
from some specific disease or chronic infirmity of body, for which
they have to be medically treated. If the patient happens to be
suffering from certain diseases, which are specified in an ever-
lengthening schedule, the argument about the "defect in the citizen
character," and the "grave danger to its integrity" is abandoned; the
sick person is then, by common consent, searched out, urged to
accept State aid, freely maintained at the public expense, and—what
is very significant to us in this argument—treated without the
slightest pretence that he has a moral defect, and without any idea
of curing that defect, or avoiding the danger to his integrity, but
simply and solely with the object of restoring him at the earliest
moment to physical health. Meanwhile the responsible Authority is at
work effecting, by cleansing, disinfecting, draining, and improving
the housing, the water-supply, and the general sanitation, alterations
in the environment in which the disease has occurred, in order to
prevent its recurrence, either in that patient or in any one else. The
patients of the Local Health Authority, though their numbers are
growing day by day, the Majority Report leaves outside the "one
Authority and only one Authority" which (as it is suggested) ought to
deal with all those for whom maintenance has to be provided. Whilst
we on the Poor Law Commission were deliberating, the Local
Government Board for Scotland added to this class all the enormous
number of persons suffering from tuberculosis.[866] In spite of the
fact that the more enterprising of the Parish Councils are already
beginning to provide extensively for phthisis patients in their
Poorhouses, the work is now to be undertaken by the Local Health
Authorities. We note that the Majority Report makes no protest
against this enormous extension of the area of overlap between the
two sets of Authorities, and expressly assumes that, to the extent
that tuberculosis prevails among the present pauper host, the Poor
Law is to be broken up, and its functions gradually taken over by the
Local Health Authorities. Apparently it is admitted that, with regard
to persons suffering from tuberculosis in any of its forms, we must
give up the assumption that they have some "defect in the citizen
character," in common with the vagrants and the unemployed
workmen; or at any rate we must give up any idea of treating them
for this moral defect or grave danger to their integrity.
What the public welfare requires is, as is now admitted, that these
sick persons should be treated with a single eye to arresting the
course of their disease, and restoring them as soon as possible to
physical health. Moreover, as sickness is plainly, to an undefined
extent, the result of bad environment—of overcrowding, insanitation,
unwholesome food, polluted water, or injurious conditions of
employment—it is important that it should be in the hands of an
authority officially cognisant of this environment, and empowered to
alter that which is producing the sickness. The question necessarily
arises whether there is any ground for dealing with any neglected
sick persons who need medical treatment, in any different way from
that in which we have now decided to treat phthisis patients—
whether we have any more ground for assuming the co-existence of
a "defect in the citizen character" or "grave danger to its integrity,"
along with cancer, rheumatism, lead poisoning, hernia, or varicose
veins, than along with pulmonary consumption—whether, in fact, the
State has any justification for treating any sick person at all
otherwise than with a single eye to arresting their diseases and
preventing their occurrence in others—whether in the interests of
the community as a whole we are not bound to drop the idea of
"deterring" the sick "by expectation and example" from coming to be
cured, and are not bound therefore to put the whole function into
the hands of the organ which the State has created for the
prevention and treatment of disease, namely, the Local Health
Authority?
When we turn to the aged, who make up the bulk of the remainder
of the pauper host, the question of whether or not we can assume
the universal existence of a "defect in the citizen character" or
"grave danger to its integrity" becomes irrelevant. As there can,
speaking practically, be no idea of improving the character of the
aged, it is difficult to see why it should be suggested that the worn-
out men and women for whom the State has to provide, and whose
moral defects cannot now be cured, should necessarily be merged
with the persons whose assumed moral defects are still curable, and
who are therefore to be placed under an Authority specialising on
this business of treating the "defect in the citizen character" that
always accompanies the need for State maintenance. In the case of
the aged, in fact, the assumption that they should be placed under a
Poor Law Authority with a view to remedying their assumed defects
becomes hypocritical. In their case, it is clear, their retention in the
class "pauper," and their relegation to the Poor Law Authority, is
advocated, not for their own good. They are, it is suggested, to be
accorded a treatment other than that which the State would
otherwise afford to them—that is to say, they are to suffer the
stigma of pauperism—merely in order "by expectation and example"
to deter other persons from taking advantage in their old age of the
maintenance which the State affords. This policy we are relieved
from having to characterise, because by the passing of the Old Age
Pensions Act of 1908, the community has, even whilst we were
deliberating, definitely declared against it. We see, therefore, no
need whatsoever, now that there is in every County and Burgh a
special Authority for the aged (the Local Pension Committee), for
relegating any aged persons to the Poor Law Authority.
Of the non-able-bodied paupers—and it is for the non-able-bodied
that the Scottish Poor Law lawfully provides—there remain only "the
feeble-minded," and the epileptic, and the persons of "unsound
mind," who make up nearly one-fifth of the whole of Scottish
pauperism. Of this fifth, about two-thirds are already under the
administrative care, not of the Poor Law Authority at all, but of the
Local Lunacy Authority, whilst about one-third (including the
epileptics, the uncertified imbeciles, and the merely feeble-minded)
are still looked after by the Parish Councils. All these persons, we
must admit, actually do have, co-existing with their pauperism, a
"defect in the citizen character," a mental weakness frequently
"moral" in its nature, and one which is coming more and more to be
regarded as susceptible to appropriate treatment. Here then, if
anywhere, one might think that there is ground for assigning these
paupers to the Authority which is by its supporters assumed to
specialise on the treatment of the specific "defect in the citizen
character," which is asserted to be co-extensive with the need for
State maintenance. But the Royal Commission on the Care and
Control of the Feeble-minded, after exhaustively examining the
subject and concentrating its whole attention upon it, came to the
conclusion that the Poor Law Authority was inherently unsuited for
treating any kind of mentally defective person, and decided to
recommend the removal of all such persons from the sphere of the
Poor Law, and their being placed henceforth entirely in the hands of
an Authority, the Local Lunacy Authority, which had both the special
knowledge and the special machinery for treating the mental
defectiveness that had been actually proved to exist, rather than the
hypothetical "defect in the citizen character" that their need of State
maintenance is supposed to imply. Our colleagues who have signed
the Majority Report, torn between their own assumption of the need
for "one Authority and only one Authority" for all the destitute, and
the very authoritative recommendations of the contemporary Royal
Commission, have apparently been unable to come to any certain
conclusion as to what they wish done with regard to this one-fifth of
all the paupers. In the Majority Report for England and Wales, dated
February 1909, our colleagues concurred with us in recommending
the carrying out of the proposals of the Royal Commission on the
Care and Control of the Feeble-minded; in desiring the transfer of all
provision for the mentally defective to the Local Lunacy Authorities;
in urging the removal from this unfortunate class of the "stigma of
pauperism," and in so far "breaking up the Poor Law," and departing
from the idea of relegating all who needed State maintenance to
"one Authority and one Authority only," which should treat them all
for their assumed common "defect in the citizen character."[867]In the
case of Ireland, where the lunatic asylums are at present entirely
outside the Poor Law, and their inmates are not paupers, our
colleagues, in their Majority Report, dated June 1909, recommended
exactly the opposite course from that which they proposed for
England and Wales. Instead of transferring the feeble-minded to the
Local Lunacy Authority, they recommended that the Local Lunacy
Authority should cease to exist as a separate Authority; and that all
the lunatics and lunatic asylums should be transferred, along with
the unemployed workmen and the infectious sick, to the new
Authority that they wish to administer the Poor Law. When we come
to Scotland, our colleagues, in their Majority Report dated October
1909, made no recommendations on the subject at all as to the
Authority;[868] and are therefore in the position of implicitly endorsing
the status quo, which, as we have mentioned, is one of overlap
between the Poor Law and Lunacy Authorities, each of which has
under its administrative care a certain proportion of the lunatics,
idiots, imbeciles, epileptics, and feeble-minded for whom Scotland
has to provide, and with regard to some of whom very inadequate
provision is now made. We cannot agree to leave the matter in this
way. We do not see that the nature of lunacy or feeble-mindedness
differs in the three Kingdoms to such an extent as to warrant three
different policies in its treatment. We think that the first mind of our
colleagues was the best. We, like the Royal Commission on the Care
and Control of the Feeble-minded, see no reason why lunatics
should be treated as paupers any more than as criminals. We
certainly see no reason why Scottish lunatics and feeble-minded
should remain paupers, when English lunatics and feeble-minded are
to be relieved from this stigma. We, therefore, think that Scotland
should see to it that the mentally defective of all grades are, at the
earliest possible moment, wholly removed from the Poor Law and
the Poor Law Authority, and placed entirely under the care of the
special Lunacy Authority, which can deal with them with a single eye
to the needs of their condition.
We proceed now to consider the last section of all, the adult able-
bodied man or woman without means, who becomes destitute
through not being in employment at wages. We think that it is
invidious and unwarranted to assume that such unemployment is, in
any particular case, wholly or even mainly the result of any "defect
of the citizen character." We have been unable to resist the evidence
that unemployment, and even acute distress from unemployment,
comes, as a matter of fact, to workmen of excellent skill and
character. We have been much impressed, amid the heterogeneous
crowd of "the unemployed," by the number of worthy and capable
men who have found themselves thrown out of long-held situations
by the bankruptcy of their employers, by some change of industrial
process, by the invention of a new machine, or by the decay of
particular industries. In these cases, as has been well brought out by
Mr. W. H. Beveridge,[869] the very excellence of the workman, by his
long continuance in the groove to which the employer has required
him to fit, may have rendered him less capable of obtaining another
situation, and even less able to fill it when found. Notwithstanding
the frequency of cases of this sort, it is, we think, clear that a
majority of those who, in any given state of trade, come into distress
through long-continued unemployment or chronic "under-
employment," are—with many individual exceptions—either the less
strong or the less fit, the less skilled or the less capable, the less
responsible or the less regular in their industry of the wage-earning
community. Hence though it is the relative defectiveness of the
social environment (such as the lack of organisation of the Labour
Market, or the anarchic fluctuations of trade) that in the main
determine the amount of Under-employment, or the degree to which
Under-employment prevails, at any given place and time, it is the
relative defectiveness of one wage-earner as compared with another
that in the main determines upon which individuals the
Unemployment or Under-employment will actually fall. This fact,
though it does not relieve us from the necessity of providing for
these individuals, serves as a warning against certain proposed
methods of provision. Moreover, whilst persons cannot voluntarily
become infants or children, or aged or mentally defective, in order to
qualify for the provision which the State makes for these sections,
and are not likely to make themselves acutely sick or permanently
infirm in order to get medically treated, even if this incidentally
includes their maintenance, there is an obvious danger that the
lower types of men will tend to become destitute through chronic
unemployment, if "by expectation and example" they see any
chance of maintenance without sustained effort, under conditions as
pleasant to them as work at wages. Hence, in the case of the able-
bodied, it is true that the result of the State provision on the amount
and quality of productive effort, not only in the persons treated, but
also in all those who might "by expectation and example" be led to
apply for treatment, becomes the paramount consideration.
The suggestion that "where there is a failure of social self-
maintenance ... there is a defect in the citizen character, or at least a
grave danger to its integrity," is, indeed, in any careful analysis, seen
to be true, if at all, of the able-bodied and of the able-bodied only. It
is exactly because we realise the overwhelming importance to the
character of the community of stimulating, in all sections of the able-
bodied, the desire and faculty for self-maintenance, that we urge the
necessity of having an Authority dealing with the able-bodied, and
with the able-bodied only. It is, we suggest, just because the Parish
Council, as a Poor Law Authority, has been required to be
simultaneously a Hospital Authority for the sick, an Asylum Authority
for the mentally defective, an Education Authority for the children,
and a Pension Authority for the aged, that it has never been able to
deal efficiently with the able-bodied. If it had been able to keep its
Poorhouse exclusively for the able-bodied—even for the able-bodied
whom the medical officer felt obliged to certify as temporarily
disabled lest they should starve to death—it might, at any rate, by
appropriate discipline, have stopped the Poorhouse from becoming a
visible source of deterioration of the able-bodied inmates. The
inference, therefore, that we draw from the argument as to the
"moral factor" in destitution, of which, in the case of the able-
bodied, we recognise the full force, is that it is imperative that there
should be, not one Authority for all persons needing public
assistance, whatever their age, sex, or condition, but one Authority
for all the adult able-bodied persons who are not specially certified
as sick or permanently incapacitated, as mentally defective, or as
having attained a specified limit of age. We regard the wise
treatment of all such adult able-bodied persons as have to be
maintained from public funds as being of such great difficulty and
complexity as to demand, not only that it should be the work of a
single Authority specialising on their problem, but also that this
Authority should be one free from the influences of particular
localities, and able to command the highest administrative skill that
the nation can supply.
There is an additional reason for not thrusting the able-bodied
unemployed person into the hands of a new Poor Law Authority
restricted to the function of relieving destitution. Up to the present,
the Scottish Poor Law has not included any provision whatsoever for
the able-bodied, the only lawful method of relief from public funds
being that afforded by the Distress Committee under the
Unemployed Workmen Act of 1905. Hence the famous principle of
the English Poor Law reform of 1834—that the condition of the able-
bodied pauper should always be less eligible than that of the lowest
grade of independent labourer—has never been adopted by the
administrators of the Scottish Poor Law. To transfer, as is proposed
by our colleagues in the Majority Report, the whole responsibility for
the able-bodied unemployed from the Distress Committees to a new
Poor Law, or, as they say, Public Assistance Authority, would, we
think, inevitably tend to introduce into Scotland a principle which
has, in England, proved a complete failure. We now see that the
condition of the lowest grade of independent labourer—whether he
is chronically "under-employed" like the whole class of dock and
other casual labourers, or "sweated" like the home-working chair-
maker or slipper-maker—is so deplorably below the level of adequate
subsistence that to make the lot of the pauper "less eligible" means
to reduce him below any acceptable standard of civilised existence.
It has been found, in fact, impossible to give the pauper less food,
less clothing, less rest and sleep, or less eligible housing
accommodation than that of the lowest grade of independent
labourer without actually and obviously impairing his physical health.
Hence the alternative has been to concentrate the "less eligibility" on
the conditions of the pauper's mental life. However worthy and
innocent have been the able-bodied applicants for Poor Law relief,
the policy of the English Poor Law has been to degrade them in their
own eyes and in the eyes of the public, to exclude them from
citizenship by depriving them (though not the convicted criminals) of
the right to be placed on the electoral register; to subject them to
hard labour of the most monotonous and useless character, such as
stone-breaking or corn-grinding, or even oakum-picking; to subject
them to the shameful promiscuity of the General Mixed Workhouse
or the gaol-like severities of the Able-bodied Test Workhouse; and
this "deterrent" treatment has, by the very principles of the Poor
Law, had to be meted out to all comers, whether or not they have
been found, as a matter of fact, to have any moral defect at all. This
"principle of less eligibility" has been, in fact, in the English Poor
Law, a mere device for mechanically diminishing, "by expectation
and example," able-bodied pauperism—meaning help from the Poor
Rate. It has been found wholly ineffective (and has, indeed, stood in
the way of the adoption of anything effective) for diminishing the
able-bodied destitution which leads presently to pauperism, as well
as for striking at the causes which bring men to this destitution. This
policy of "less eligibility," into which any Poor Law Authority is only
too apt to be driven in dealing with the able-bodied, seems to us so
futile and so barbarous in its inhumanity, and leads to such
demoralising forms of parasitism on the labour of women and
children, on begging and vagrancy, and even on a career of crime,
that we should regard its introduction into Scotland, by the new
Public Assistance Authorities that our colleagues propose, as nothing
less than a national disaster.
We think that the time has come for the nation definitely to
repudiate the policy of "deterring" persons who are destitute from
coming under the care and control of the State; and this equally
when the destitute persons are able-bodied and when they are sick
or mentally defective. We urge the deliberate adoption of the
opposite principle of searching out those who are in any respect
destitute, with a view to taking hold of their cases at the earliest
possible moment, when they may still be curable, and of enforcing
on all able-bodied persons the obligation to maintain themselves and
their dependants in health and efficiency. We consider that it is now
possible to proceed with regard to unemployment on the same
general lines as we proceed with regard to illiteracy in children and
with regard to infectious disease. We recommend that, by the
systematic enforcement of parental responsibility for the condition of
all dependants by the Local Education Authority and the Local Health
Authority, and by the systematic suppression of mendicity and
vagrancy by the Local Police Authority, every person who is not in a
position to provide for his wife and children, or who wilfully or
negligently abstains from doing so, should—whether or not he
applies for assistance—stand revealed to the new Authority that we
propose for dealing with the able-bodied. By an organised use of the
National Labour Exchange this Authority will be able to ascertain
whether there are possibilities of employment for such men, and
where such openings are, and what is the kind of training that they
require. If resort to the National Labour Exchange becomes general
among employers, and if it is made compulsory on those who take
on hands for casual jobs, it will be possible for the Authority so to
"dovetail" jobs and seasonal occupations as to go far towards
ensuring continuous employment for those who are taken on at all.
There will remain the persons who by this very "decasualisation" of
labour and suppression of chronic "under-employment" are squeezed
out of their present miserable partial earnings. For these it must be
the duty of the National Authority to provide, and, as soon as
possible, absorb them in productive industry. Fortunately there is at
hand in the diminution of boy labour by the increasing absorption of
the boy's time in technical education, in the reduction of excessive
hours of labour on railways, tramways, and omnibuses, and in the
withdrawal of the mothers of young children from the labour market
when they are required, as a condition of their aliment, to devote
themselves to their family, together with the possibilities of
development opened up by afforestation, etc., which we have
elsewhere sufficiently described, more than enough opportunities for
the absorption of this temporary surplus. But the cyclical fluctuations
of trade, with the consequent waxing and waning of the aggregate
demand of productive industry, must always be counted on; and
these cyclical fluctuations in demand for labour, as we have shown,
can be counteracted, and the volume of wage-earning employment
in the country as a whole maintained at something like a constant
level, by a mere rearrangement over each decade, of the
Government works and orders that must in any case be executed
within the decade, though not necessarily, as at present, in equal
instalments year by year. All this organised attempt to prevent
unemployment, which we regard as the primary duty of the National
Authority, though we have reason to believe that it can obviate the
greater part of the involuntary lack of work from which so many of
the wage-earners now suffer, will not, of course, completely secure
every individual workman in permanent employment. To provide for
such cases we look, in the main, to a great extension of Trade Union
insurance, rendered possible to many more industries than can yet
organise "out of work benefit" by adequate subventions from public
funds on the lines of the well-known Ghent system. Finally, when all
this is done, the National Authority for the able-bodied will still have
on its hands those who are for one reason or another uninsured,
and for whom, whether from their own faults or defects or not, the
Labour Exchange fails to find a situation. But even these must not
be deterred from coming under care and control, and must, in the
public interest, not be kept at arm's length to degenerate or become
demoralised. For them the National Authority must provide
maintenance, with adequate Home Aliment for their dependants, in
the way that we have described, and under the course of physical
and industrial training best calculated to make them more fit than
they now are for the work which the Labour Exchange will, sooner or
later, be able to find for them. We see no reason for penal
conditions, such as have prevailed in the English Able-bodied Test
Workhouses, for any honest and willing man. Only when a man has
been definitely proved to be unwilling to work for the maintenance
of himself and his dependants, or persists in recalcitrancy and
refusal to co-operate in his own cure, need he be committed by the
magistrates to a Detention Colony, there to be treated in whatever
way is found best adapted to remedy the moral defect which he will
then have been actually convicted of possessing.
To sum up, we hold it untrue and unwarranted to suggest that all
those whom the State finds on its hands as destitute—the infants
and children, the sick and the mentally defective, the aged and the
unemployed able-bodied—have necessarily any moral taint or defect
in common, for which they need all to be treated by a single
Authority, or can properly all be treated by such an authority,
specialising on this presumed common attribute. We hold, on the
contrary, that experience has demonstrated that, although
individuals in all sections of the destitute may be morally defective,
and this in all sorts of different ways, the great mass of destitution is
the direct and (given human nature as it is) almost inevitable result
of the social environment in which the several sections have found
themselves; and that it can, to a large and as yet undefined extent,
be obviated if the cases are taken in time, and the environment
appropriately changed. We suggest that the failure of the existing
Poor Law Authorities is due mainly to the fact that, as Poor Law
Authorities, they are inherently incapable of getting hold of the cases
in time before destitution has set in, and that they are necessarily
prevented, by their very nature as "Destitution Authorities," from
changing the social environment which is bringing about the
destitution, or from providing the new environment that is necessary,
whether by way of treatment or by way of disciplinary supervision
after actual treatment, either for the infants or for the children, for
the sick or for the mentally defective, for the aged and infirm or for
the unemployed able-bodied. We consider that it is proved, by the
experience of the several specialised and preventive Authorities that
have been established for this purpose, that the arrest of the causes
of destitution, and the necessary changes in the social environment,
can be effected only by making each such Authority responsible for
its own special part of the work of prevention, and for providing the
appropriate treatment for the particular section of persons in whom
it may have failed to prevent destitution. We fully admit the
importance of the "moral factor" in contributing to the production of
some of the destitution in all the sections; but the moral defect is
not always in the destitute person himself, and we hold that this
"moral factor" can never be effectually dealt with, and can never be
subjected to the disciplinary and reformatory treatment that it
requires, until we give up assuming its existence where we have no
actual proof, and until we are prepared to base such treatment solely
upon the definite conviction, by judicial process, of particular
individuals for particular offences. In no case, whether individually
innocent or morally guilty, do we think that the destitute person
should be refused treatment, or "deterred" from applying for it. On
the contrary, we hold that every destitute person not under
treatment is a menace to the commonweal; and the public
authorities should therefore search out all such cases, as if they
were cases of typhus, and endeavour to get hold of them at the
most incipient stage of the disease. And if we are asked what we
would substitute for the "deterrent" treatment of the Poor Law, in
order to protect the State from being eaten up by a multitude of
applicants for its aid, we reply that in no case do we suggest the
provision of maintenance, or of any form of public assistance,
otherwise than in the guise of the most appropriate treatment for
the actual disease or infirmity or lack that the individual is
demonstrated to be suffering from; that this treatment is not
necessarily gratuitous, efficient provision being made for recovery of
cost wherever there is ability to pay; that such treatment is never
unconditional, and is from the very nature of the case disciplinary;
that it necessarily includes long-continued supervision, even after
treatment; and that co-operation in one's own cure, together with
willingness to fulfil all parental, marital, and personal obligations,
opportunity to doing so being provided, will for the first time be
really enforced, and if necessary enforced, when other means have
failed, by commitment to a Detention Colony.
Summary of Conclusions
It is on all these grounds that we feel compelled to dissent from the
recommendations of the Majority Report in favour of setting up a
new Destitution Authority, which should administer relief only at the
period of destitution, and which should have under its charge
indiscriminately men, women, and children, the sick and the healthy,
the infant and the aged, the unemployed workman and the
incorrigible vagrant. We believe that the establishment of any such
general Destitution Authority, under whatever designation, and
however selected or appointed, would inevitably lead to the
perpetuation of the General Mixed Poorhouse, and the customary
dole of Aliment or Outdoor Relief. We cannot but fear that such a
proposal means the abandonment of any hope of preventing the
occurrence of Unemployment and the gradual sinking into
destitution that we see going on; that it implies practically a
despairing acquiescence in the daily manufacture of
"unemployables," and in the daily creation of new pauperism, which
is the disquieting feature of the time. We, on the contrary, believe
that destitution can be prevented, and that it is the business of the
State, in its national and local organisation, to take the steps
necessary to prevent it. In this dissent we have confined ourselves
to argument as to the general principle. We have not attempted to
make definite and detailed recommendations as to how the principle
of breaking up the Poor Law, and transferring its several services to
the specialised preventive Authorities, should be applied to the
present machinery of administration in Scotland. We do not feel
qualified, for instance, to decide whether the care of the children can
be best entrusted wholly to the School Boards, or whether, with a
view to an equalisation of the rates, this work might advantageously
be shared in by the County Committees of districts under the
Education (Scotland) Act of 1908. We do not pretend to advise
whether the District Boards of Lunacy, with the new duties with
regard to the feeble-minded, and the complete disconnection of all
their work from the Poor Law recommended by the Royal
Commission on the Care and Control of the Feeble-minded, as well
as by ourselves, should or should not be modified in constitution; or
whether it might not be more advantageous for Scotland, and more
calculated to relieve its local administration from an onerous and
unequally distributed burden, if the whole work of providing for the
mentally defective were made a national service and a national
charge. With regard to the Local Health organisation, which has in
some parts of Scotland to cope with great geographical difficulties,
we do not feel warranted in making any definite recommendation as
to the constitutions, areas, and powers of the present Health
Authority in Burghs and Counties respectively. Nor do we think it
necessary to pronounce upon the question of whether the National
Department for the Able-bodied—with its Labour Exchanges, its help
towards Insurance against Unemployment, its duty in regularising
the seasonal trades and "decasualising" casual labour, its work in
promoting the absorption of the surplus labourers who may be thus
squeezed out, its attempts to regularise the aggregate national
demand for labour, and its training establishments and Detention
Colonies—should be separate and self-contained for Scotland, or
whether it might not, like the Board of Trade and the Factory
Inspection Department, more advantageously form part of the wider
organisation for the United Kingdom as a whole. All these are
administrative details to be determined by those personally
acquainted with Scottish Local Government, and in accordance with
Scottish public opinion. We must content ourselves with suggesting
that, if it is thought that the time has come when we need no longer
rest satisfied with merely relieving destitution, but can start an
effective campaign for its prevention; if it is felt that the children
ought to be rescued from demoralisation and the sick from
preventable disease and preventable suffering; if it is desired to put
an end to the demoralisation and destruction of character now
caused by Unemployment, and especially by Under-employment,
then we must proceed generally upon the lines herein laid down.
We therefore recommend:—
1. That the Scottish Poor Law be abolished, and in its stead an
entirely different method of provision for those needing public aid be
inaugurated, so as to get rid of pauperism, both the name and the
thing.
2. That a systematic Crusade against Destitution in all its forms be
set on foot; against the destitution caused by Unemployment, the
destitution caused by Old Age, the destitution caused by Feeble-
mindedness and Lunacy, the destitution caused by Ill-health and
Disease, and the destitution caused by Neglected Infancy and
Neglected Childhood.
3. That the Local Education Authority be empowered and required to
search out all children of school age within its district who are
destitute of proper nurture, and to secure to them a fitting
upbringing.
4. That the Local Health Authority be empowered and required to
search out all sick persons within its district who are destitute of
medical attendance, all infants destitute of proper nurture, and all
infirm persons needing medical attendance and nursing, and to
apply the appropriate treatment, either in the homes or in suitable
institutions.
5. That the Lunacy Authority be empowered and required to search
out all feeble-minded and mentally defective persons destitute of
proper care and control, and to make appropriate provision for them.
6. That the Local Pension Authority be empowered and required to
search out all persons within its district who are destitute from old
age, and to provide Old Age Pensions for such of them as are able
and willing to live decently thereon.
7. That a new National Authority be empowered and required to
search out all able-bodied persons destitute of employment; to take
the necessary steps both to diminish, as far as practicable, the social
disease of Unemployment, and to supply proper maintenance and
training for those who are unemployed and unprovided for.
8. That all these specialised and preventive Authorities be
empowered and required to enforce, by counsel and warning, by the
sustained pressure of public opinion, and where needed by process
of law, the obligation of all able-bodied persons to maintain
themselves and their families in due health and efficiency.
INDEX OF UNIONS AND OTHER
PLACES MENTIONED
A B C D E F G H I J K L M
N O P Q R S T U V W X Y Z
A
Aberayron, 322
Abergavenny, 322, 324
Aberystwith, 322
Abingdon, 23 n., 322
Albans, St., 322
Alcester, 322
Alderbury, 322, 337
Aldershot, 217 n.
Alnwick, 322
Alstonfield, 322, 323, 331
Alton, 322, 330
Altrincham, 322, 325
Alverstoke, 322
Amersham, 322
Amesbury, 322
Ampthill, 322, 341
Andover, 75, 132, 322
Andrew, St. (Whittlesey), 340
Anglesey, 322, 330
Arrington, 326
Arundel, 322, 327
Asaph, St., 322
Ash, 323, 328, 329
Ashbourne, 322, 323
Ashby de la Zouch, 323
Ashford, 323
Ashton-under-Lyne, 27 n., 130 n., 323
Aston, 23 n., 323
Atcham, 109 n., 323, 337
Atherstone, 323, 324
Auckland, 323
Austell, St., 323
Australia, 141, 142
Axbridge, 323
Aylesbury, 323
Aylsham, 323
Aysgarth, 323
B
Bainbridge, 323
Bakewell, 98 n., 107 n., 180 n., 323
Bala, 323
Banbury, 323
Bangor, 323
Barnet, 323
Barnsley, 128 n., 323
Barnstaple, 323
Barrow-in-Furness, 323, 339
Barrow-on-Soar, 323
Barton Regis, 323, 325, 326, 339
Barton-upon-Irwell, 323, 326
Barwick-in-Elmet, 323, 331, 335, 338, 340
Basford, 323
Basingstoke, 323
Bath, 173, 323
Battle, 323
Beaminster, 323
Beaumaris, 323
Bedale, 177 n., 323
Bedford, 323
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like