0% found this document useful (0 votes)
3 views

Functional Programming in C First Edition Ivan Cukic instant download

The document provides links to various ebooks related to functional programming and C programming, including titles by authors such as Ivan Cukic and Tomas Petricek. It highlights the content of the book 'Functional Programming in C' by Ivan Cukic, which covers topics such as pure functions, lazy evaluation, and functional data structures. The document also includes information about the publisher, Manning Publications, and the book's structure, including chapters and topics covered.

Uploaded by

osseimaswi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Functional Programming in C First Edition Ivan Cukic instant download

The document provides links to various ebooks related to functional programming and C programming, including titles by authors such as Ivan Cukic and Tomas Petricek. It highlights the content of the book 'Functional Programming in C' by Ivan Cukic, which covers topics such as pure functions, lazy evaluation, and functional data structures. The document also includes information about the publisher, Manning Publications, and the book's structure, including chapters and topics covered.

Uploaded by

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

Functional Programming in C First Edition Ivan

Cukic download

https://ebookultra.com/download/functional-programming-in-c-
first-edition-ivan-cukic/

Explore and download more ebooks or textbooks


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

Real World Functional Programming With Examples in F and C


1st Edition Tomas Petricek

https://ebookultra.com/download/real-world-functional-programming-
with-examples-in-f-and-c-1st-edition-tomas-petricek/

Functional programming in Python 1st Edition David Mertz

https://ebookultra.com/download/functional-programming-in-python-1st-
edition-david-mertz/

Programming Concepts in C 2nd Edition Robert Burns

https://ebookultra.com/download/programming-concepts-in-c-2nd-edition-
robert-burns/

Programming in C 2 e Second Edition Dey

https://ebookultra.com/download/programming-in-c-2-e-second-edition-
dey/
Memory as a Programming Concept in C and C Frantisek
Franek

https://ebookultra.com/download/memory-as-a-programming-concept-in-c-
and-c-frantisek-franek/

C Programming in Linux 1st edition Edition Haskins D.

https://ebookultra.com/download/c-programming-in-linux-1st-edition-
edition-haskins-d/

Object Oriented Programming in C 4th Edition E.


Balagurusamy

https://ebookultra.com/download/object-oriented-programming-in-c-4th-
edition-e-balagurusamy/

Programming Microcontrollers in C 2nd ed Edition Ted


Vansickle

https://ebookultra.com/download/programming-microcontrollers-in-c-2nd-
ed-edition-ted-vansickle/

Concepts in programming languages 1st Edition John C.


Mitchell

https://ebookultra.com/download/concepts-in-programming-languages-1st-
edition-john-c-mitchell/
Functional Programming in C First Edition Ivan Cukic
Digital Instant Download
Author(s): Ivan Cukic
ISBN(s): 9781617293818, 1617293814
Edition: First Edition
File Details: PDF, 10.54 MB
Year: 2018
Language: english
MANNING
Functional Programming in C++
Functional Programming
in C++
IVAN ČUKIĆ

MANNING
Shelter Island
For online information and ordering of this and other Manning books, please visit www.manning.com.
The publisher offers discounts on this book when ordered in quantity.
For more information, please contact
Special Sales Department
Manning Publications Co.
20 Baldwin Road
PO Box 761
Shelter Island, NY 11964
Email: orders@manning.com

©2019 by Manning Publications Co. All rights reserved.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form
or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the
publisher.

Many of the designations used by manufacturers and sellers to distinguish their products are claimed
as trademarks. Where those designations appear in the book, and Manning Publications was aware of a
trademark claim, the designations have been printed in initial caps or all caps.

∞ Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books
we publish printed on acid-­free paper, and we exert our best efforts to that end. Recognizing also our
responsibility to conserve the resources of our planet, Manning books are printed on paper that is at
least 15 percent recycled and processed without the use of elemental chlorine.

Manning Publications Co. Development editor: Marina Michaels


20 Baldwin Road Technical development editor: Mark Elston
PO Box 761 Review editor: Aleksandar Dragosavljevic´
Shelter Island, NY 11964 Project editor: Lori Weidert
Copy editor: Sharon Wilkey
Proofreader: Tiffany Taylor
Technical proofreader: Yongwei Wu
Typesetter: Happenstance Type-O-Rama
Cover designer: Leslie Haimes

ISBN 9781617293818
Printed in the United States of America
1 2 3 4 5 6 7 8 9 10 – SP – 23 22 21 20 19 18
brief contents
1 ■ Introduction to functional programming 1
2 ■ Getting started with functional programming 21
3 ■ Function objects 45
4 ■ Creating new functions from the old ones 71
5 ■ Purity: Avoiding mutable state 100
6 ■ Lazy evaluation 122
7 ■ Ranges 142
8 ■ Functional data structures 158
9 ■ Algebraic data types and pattern matching 174
10 ■ Monads 199
11 ■ Template metaprogramming 226
12 ■ Functional design for concurrent systems 248
13 ■ Testing and debugging 274

v
contents
preface xiii
acknowledgments xv
about this book xvii
about the author xxi

1 Introduction to functional programming


1.1 What is functional programming? 2
1

Relationship with object-oriented programming 3 ■ A concrete


example of imperative vs. declarative programming 3

1.2 Pure functions 8


1.2.1 Avoiding mutable state 10

1.3 Thinking functionally 12


1.4 Benefits of functional programming 14
Code brevity and readability 15 Concurrency and

synchronization 16 Continuous optimization 17


1.5 Evolution of C++ as a functional programming


language 17
1.6 What you’ll learn in this book 19

vii
viii contents

2 Getting started with functional programming


2.1 Functions taking functions? 22
21

2.2 Examples from the STL 24


Calculating averages 24 Folding 27 String
■ ■

trimming 31 Partitioning collections based on a


predicate 32 Filtering and transforming 34


2.3 Composability problems of STL algorithms 36


2.4 Writing your own higher-order functions 38
Receiving functions as arguments 38 Implementing ■

with loops 38 Recursion and tail-call


optimization 40 Implementing using folds 43


3 Function objects
3.1
45
Functions and function objects
Automatic return type deduction 46 Function
46

pointers 49 Call operator overloading 50 Creating


■ ■

generic function objects 52

3.2 Lambdas and closures 54


Lambda syntax 55 Under the hood of lambdas 56 Creating
■ ■

arbitrary member variables in lambdas 59 Generic lambdas 60■

3.3 Writing function objects that are even terser


than lambdas 61
Operator function objects in STL 64 ■ Operator function objects
in other libraries 65

3.4 Wrapping function objects with std::function 68

4 Creating new functions from the old ones


4.1 Partial function application 72
A generic way to convert binary functions into unary
71

ones 74 Using std::bind to bind values to specific


function arguments 77 Reversing the arguments of a


binary function 79 Using std::bind on functions with


more arguments 80 Using lambdas as an alternative for


std::bind 83

4.2 Currying: a different way to look at functions 85


Creating curried functions the easier way 87 Using currying ■

with database access 88 Currying and partial function


application 90
contents ix

4.3 Function composition 92


4.4 Function lifting, revisited 95
Reversing a list of pairs 97

5 Purity: Avoiding mutable state 100


5.1 Problems with the mutable state 101
5.2 Pure functions and referential transparency 103
5.3 Programming without side effects 106
5.4 Mutable and immutable state in a
concurrent environment 110
5.5 The importance of being const 113
Logical and internal const-ness 115 Optimizing member

functions for temporaries 117 Pitfalls with const 119


6 Lazy evaluation
6.1 Laziness in C++
122
123
6.2 Laziness as an optimization technique 126
Sorting collections lazily 126 Item views in the user

interfaces 128 Pruning recursion trees by caching function


results 129 Dynamic programming as a form of laziness 131


6.3 Generalized memoization 133


6.4 Expression templates and lazy string concatenation 136
Purity and expression templates 140

7 Ranges 142
7.1 Introducing ranges 144
7.2 Creating read-only views over data 145
Filter function for ranges 145 Transform function for

ranges 146 Lazy evaluation of range values 147


7.3 Mutating values through ranges 149


7.4 Using delimited and infinite ranges 151
Using delimited ranges to optimize handling input
ranges 151 Creating infinite ranges with sentinels
■ 152

7.5 Using ranges to calculate word frequencies 154


x contents

8 Functional data structures


8.1 Immutable linked lists
158
159
Adding elements to and removing them from the start of
a list 159 Adding elements to and removing them from the

end of a list 161 Adding elements to and removing them


from the middle of a list 162 Memory management 163


8.2 Immutable vector-like data structures 165


Element lookup in bitmapped vector tries 167 Appending ■

elements to bitmapped vector tries 168 Updating elements in


bitmapped vector tries 171 Removing elements from the end of


the bitmapped vector trie 171 Other operations and the overall

efficiency of bitmapped vector tries 171

9 Algebraic data types and pattern matching


9.1 Algebraic data types 175
Sum types through inheritance 176 Sum types through

174

unions and std::variant 179 Implementing specific


states 182 Special sum type: Optional values 184 Sum


■ ■

types for error handling 186

9.2 Domain modeling with algebraic data types 191


The naive approach, and where it falls short 192 ■ A more
sophisticated approach: Top-down design 192

9.3 Better handling of algebraic data types with


pattern matching 194
9.4 Powerful pattern matching with the Mach7 library 196

10 Monads 199
10.1 Not your father’s functors
Handling optional values 201
200

10.2 Monads: More power to the functors 204


10.3 Basic examples 207
10.4 Range and monad comprehensions 209
10.5 Failure handling 212
std::optional<T> as a monad 212 expected<T, E>

as a monad 214 The Try monad 215


10.6 Handling state with monads 216


contents xi

10.7 Concurrency and the continuation monad 218


Futures as monads 219 ■ Implementations of futures 221

10.8 Monad composition 223

11 Template metaprogramming
11.1 Manipulating types at compile-time
226

Debugging deduced types 229 Pattern matching during



227

compilation 231 Providing metainformation about


types 234

11.2 Checking type properties at compile-time 235


11.3 Making curried functions 237
Calling all callables 239

11.4 DSL building blocks 242

12 Functional design for concurrent systems


12.1 The actor model: Thinking in components 249
248

12.2 Creating a simple message source 252


12.3 Modeling reactive streams as monads 256
Creating a sink to receive messages 257 Transforming reactive

streams 260 Creating a stream of given values 262 Joining


■ ■

a stream of streams 263

12.4 Filtering reactive streams 264


12.5 Error handling in reactive streams 265
12.6 Replying to the client 267
12.7 Creating actors with a mutable state 271
12.8 Writing distributed systems with actors 272

13 Testing and debugging 274


13.1 Is the program that compiles correct? 275
13.2 Unit testing and pure functions 276
13.3 Automatically generating tests 278
Generating test cases 278 Property-based

testing 280 Comparative testing 281


13.4 Testing monad-based concurrent systems 283

index 287
preface
Programming is one of the rare disciplines in which you can create something from
absolutely nothing. You can create whole worlds that behave exactly as you want them
to behave. The only thing you need is a computer.
When I was in school, most of my programming classes focused on imperative program-
ming—first on procedural programming in C, and then on object-oriented pro-
gramming in C++ and Java. The situation didn’t change much at my university—the
main paradigm was still object-oriented programming (OOP).
During this time, I almost fell into the trap of thinking that all languages are con-
ceptually the same—that they differ only in syntax, and that after you learn the basics
such as loops and branching in one language, you can write programs in all others with
minor adjustments.
The first time I saw a functional programming language was at the university, when I
learned LISP in one of my classes. My gut reaction was to use LISP to simulate if-then-
else statements and for loops so that I could actually make it useful. Instead of trying
to change my perspective to fit the language, I decided to bend the language to allow
me to write programs in the same way I used to write them in C. Suffice it to say that back
then, I saw no point whatsoever in functional programming—everything I could do
with LISP, I could do with C much more easily.
It took a while before I started looking into FP again. The reason I did was that I was
disappointed by the slow evolution of one particular language that I was required to use
while working on a few projects. A for-each loop was added to the language, and it was
advertised as if it were a huge deal: you just had to download the new compiler, and your
life would become much easier.

xiii
Random documents with unrelated
content Scribd suggests to you:
HEROINES OF NATIONAL
PROGRESS
ELIZABETH CADY STANTON AND SUSAN B.
ANTHONY, TWO PIONEERS IN THE CAUSE OF
WOMAN'S SUFFRAGE
215. The Women of Our Nation. Women have
had a large part in the progress of our nation. In Women play an
important part
colonial days women often had to defend their in early
homes against Indians. They endured the progress
hardships of the first settlements as bravely as did
the men. They had larger rights and greater freedom than in
England at that time, because their help was so plainly necessary in
this new country.
By 1850 nearly one-fourth of the nation's manufacturing was done
by women, but otherwise until that time women's lives were spent
almost entirely in their homes. Though no colleges were open to
women until 1833, many mothers knew enough of books to prepare
their sons for college at home.
During the Revolution women formed a society
called "Daughters of Liberty," to spin and sew for Women's
service in war
their soldiers. They gave their treasured pewter
spoons and dishes to be melted up for bullets. As women have
always done, they cared for the sick and wounded after battles.
ELIZABETH CADY STANTON
From a photograph
In the great Civil War, women were needed still more to nurse the
wounded, for even then there was no Red Cross or large body of
women who were nurses by profession to call upon. Women took
the place of the men called to war in many ways, and especially in
teaching schools. On both sides women worked in the fields, and
sometimes acted as spies, or served, disguised, in the ranks.
Southern women also entered the factories in large numbers. They
had to meet even greater hardship than women in the North, and
were often face to face with starvation.
On the frontier women had always worked in the fields when
necessary, and often helped to build the houses they lived in. The
fearless pioneering spirit and fine, sturdy character of these women
won them the highest respect. This was one reason why western
states were the first to grant women the right to vote.
Long before the Civil War great leaders in the
cause of woman's advancement had appeared. Women's
equality with
These leaders saw that in many ways women had men
proved their equality with men. This encouraged
them to appeal for wider opportunities for women, who then had
almost no legal rights. The leaders now demanded the privileges
enjoyed only by men. We should all know the stories of these
women of wise and fearless vision.
216. Elizabeth Cady Stanton. Elizabeth Cady
was born in New York, in 1815. Her girlhood was a Born, 1815
happy one, spent with her brother and sisters. She
was a healthy, rosy-cheeked girl, full of life and fun, who believed
girls were the equals of boys and had just as much intellect.
When Elizabeth was eleven years old her brother
died. Her father grieved deeply over the loss of his Studies hard
only son, and Elizabeth determined to try to be to
her father all that her brother might have been. She therefore
applied herself diligently to study and self-improvement.
Her father was a lawyer. He had been a member of
Congress. Many hours out of school Elizabeth spent Finds woman's
position
in his office, listening while his clients stated their unequal
cases. She gradually became indignant at what she
found to be the unequal position of women in almost every walk of
life. She determined to devote her life to securing for women the
same rights and privileges that men had.
While studying she did not neglect the arts of
housekeeping. She regarded these as occupations Marries Henry
B. Stanton
of the highest dignity and importance. When
twenty-five years old she married Henry B. Stanton, a lawyer and
journalist who since his student days had talked and written against
slavery. But she did not forget her old resolve to struggle for the
rights of women, even when occupied with the duties of home and
children.
217. The First Woman's Rights Convention.
In 1848 Mrs. Stanton called a woman's rights Calls woman's
rights
convention—the first ever held. Its purpose was "to convention
discuss the social, civil, and religious conditions and
rights of women."
Mrs. Stanton read to the convention a set of twelve
resolutions, the now famous "Declaration of "Declaration of
Sentiments"
Sentiments." It demanded for women equality with
men and "all the rights and privileges which belong
to them as citizens of the United States," including Women
demand the
the right to vote. This was the first public demand right to vote
for woman's suffrage. The resolutions were passed.
A storm of ridicule followed the convention, but Mrs. Stanton's
position remained unchanged.
SUSAN B. ANTHONY
From a photograph by Veeder, Albany, N.Y.
218. Susan B. Anthony. A few years after this
historic convention, Mrs. Stanton met Susan B. Susan B.
Anthony, 1820
Anthony. Miss Anthony was the daughter of
Friends, or Quakers as they are often called. She was born at South
Adams, Massachusetts, in 1820. Her father maintained a school at
Battenville, New York, and here Susan received her early education.
From her seventeenth birthday until she met Mrs.
Stanton, Miss Anthony had been engaged in Teaches school
teaching school. But now the great national
questions of anti-slavery and temperance were
drawing her away from her work as a teacher. At Won to the
cause of
first Miss Anthony had not been in sympathy with woman's rights
the Declaration of Sentiments, but when she met
Mrs. Stanton the cause of woman's rights won an able, enthusiastic,
and untiring friend.
From this time on these two fought side by side for
the cause of women. They traveled and lectured in National
Woman's
all parts of the country. In 1868 they started a Suffrage
weekly paper, which they called The Revolution. Association
Miss Anthony was the business manager and Mrs.
Stanton was the editor. Its motto was, "The True Republic—men,
their rights and nothing more; women, their rights and nothing less."
In 1869 they organized the National Woman's
Suffrage Association. In many states the question Miss Anthony
casts vote for
of woman suffrage became an important one at President
election. Wherever they were needed, in California,
in New York, or in any other state, these two women could be found.
Every year from 1869 until her death, in 1906, Miss Anthony
addressed committees of Congress. In 1872 she cast a vote for
President. She declared it to be her right under the Fourteenth
Amendment to the Constitution. For this act she was arrested and
fined, but the fine was never collected.
Mrs. Stanton died in 1902. The great movement
she had started was on its way to certain victory. Women win
suffrage
Congress passed the suffrage amendment in 1919,
and in August, 1920, it became law. Over twenty-five million women
were entitled to vote in the presidential elections that year.
JULIA WARD HOWE, AUTHOR OF THE "BATTLE
HYMN OF THE REPUBLIC," AND HARRIET
BEECHER STOWE WHO WROTE "UNCLE TOM'S
CABIN"
219. Julia Ward Howe. All the great wars in which our country
has engaged have brought heavy burdens and sorrow to women.
They could not march away to fight side by side with the men. Their
duty was to cheer their loved ones as they went away to danger and
perhaps to death.
At the outbreak of the Civil War, from thousands
and thousands of homes father, husband, son, or Women in the
Civil War
brother went away, in many instances never to
return. Women were left behind, praying for their loved ones and
working untiringly night and day to provide food and clothing and to
keep up their homes.
But there were other women who could not serve
their country in this way. Many had no one to send Born 1819
away to fight. Among these was Julia Ward Howe.
She was born in New York in 1819, of wealthy and distinguished
parents. She was carefully reared, but she knew little of the work
that girls are usually taught to do. Practically everything was done
for her by servants. However, Julia dearly loved to read and study,
and very early she began to write poetry.
In 1841 she married Dr. Samuel Gridley Howe, a
noted teacher and reformer. While visiting in Marries Doctor
Howe
Washington in 1861 she saw women nursing the
wounded soldiers brought in from the battle field of
Desires to be of
Bull Run. She was deeply stirred by the sights service to the
around her. What service could she do for her Union
country? Her husband was too old to enter the
army, her son too young. She knew that there were thousands
making clothes for the soldiers in the field. But she could not sew for
the soldiers or care for the wounded, for she had never been taught
to work with her hands. She could only write poetry. Of what use
was that now?
One day her minister suggested that she write
words for the popular army tune, "John Brown's Writes "Battle
Hymn of the
Body Lies A-mouldering in the Grave." She did so, Republic"
and the poem was published in a magazine under
the name of "The Battle Hymn of the Republic."
Soon the song was being sung through all the
camps of the northern troops. The soldiers sang it It helps to bring
victory
on the march, in wild charges, or at night beside
the camp fire. Everywhere its challenge roused the northern soldiers
to a more determined fight for victory. In writing this poem Mrs.
Howe had done a great service for the Union.
JULIA WARD HOWE
From a photograph by the Notman Photo. Co.,
Boston
220. The Woman's Club. After the war Mrs.
Howe wished to continue serving her country in Founds clubs
for women
some way, and she took up the cause of woman's
rights. Women had had little or no chance to educate themselves
and broaden their minds by discussing with each other subjects
outside their homes. She thought woman's clubs would work to free
women from the narrowness of mind that comes from thinking only
of dress, hired help, and housekeeping. From then on, she devoted
herself to establishing clubs for women. She traveled over the
country and wrote and lectured on this subject. She urged that the
members of these clubs should seek not only for self-improvement
but for means of serving others; and through their efforts hospitals
for women and children, lodging houses, and labor schools were
established.
Mrs. Howe had found a means of serving her country even greater
and more effective than the writing of her "Battle Hymn of the
Republic."
221. Harriet Beecher Stowe. Another woman
who did great service for her country with her pen Born, 1811
was Harriet Beecher Stowe. She was born in 1811.
Her father was a Connecticut minister, and she was brought up in a
deeply religious home. At school she was apt at writing and she
dreamed of becoming a great author.
She married Calvin E. Stowe, a student of theology,
and thereafter devoted herself to her home and Marries Calvin
E. Stowe
her children. During the years just before the Civil
War there was much discussion of the slavery question. Mrs. Stowe
had traveled in the South and had seen how the negroes were kept
in ignorance, and how cruelly they were sometimes treated. She was
aroused by the passage of the Fugitive Slave Law and by some of
the things that happened as a result of it. She resolved to use her
talent for writing to help the slaves.
In 1851 she began the story, Uncle Tom's Cabin. It
was first published in serial form in an abolition Writes "Uncle
Tom's Cabin"
paper in Washington. It was later published in book
form. From the first, the sale of the book was enormous. It was
translated into many languages and was very popular abroad as well
as at home.
HARRIET BEECHER STOWE
From a photograph by Sarony, New York
Mrs. Stowe became famous. It is said that the book converted more
than two million people to the cause of freedom for slaves. It helped
to unite the North and to give it strength to stand firm in the great
conflict.
Mrs. Stowe continued writing in behalf of the slaves. She gave her
son to the cause of freedom. He was wounded at Gettysburg and
never regained his health. She aided in establishing schools for the
negroes in the South, and worked among them earnestly until her
death in 1896.
FRANCES E. WILLARD, THE GREAT
TEMPERANCE CRUSADER; CLARA BARTON,
WHO FOUNDED THE RED CROSS SOCIETY IN
AMERICA; AND JANE ADDAMS, THE FOUNDER
OF HULL HOUSE SOCIAL SETTLEMENT IN
CHICAGO
222. Frances E. Willard. In 1839, when Frances
Elizabeth Willard was born, thousands were leaving Frances E.
Willard, 1839
the eastern states for the new West. Her father
and mother were successful teachers in New York,
but when Frances was two years old they decided Family
moves
to Wisconsin
to move with the westward current. After living five
years at Oberlin, Ohio, the family went on to Janesville, Wisconsin,
settling on a farm in the midst of picturesque hills and woods. There
Frances and her brother and sister grew up healthy, happy children,
playing together in the forest and fields. The parents were religious
and were total abstainers, and the children never forgot their
teachings.
At fifteen years of age Frances went to school in
Janesville, and at eighteen to a Milwaukee college Stands at head
of her class
for girls. The following year she entered the
Northwestern Female College at Evanston, Illinois. At graduation she
stood at the head of her class.
Miss Willard began teaching. Then the death of her
sister Mary, and shortly afterward, of her father, Death breaks
up the home
broke up her home. That home had been an ideal
one. There the father and mother were equal in all things, and
discussed together the affairs of the household. It was a perfect
home, orderly and temperate. Frances Willard made up her mind to
spend her life in spreading abroad a knowledge of such homes, and
in helping women to become equal with men before the law.

FRANCES E. WILLARD
From a photograph
In 1874 came the anti-saloon crusade. Miss Willard
saw that this movement was part of the fight for President of
W.C.T.U.
better and happier homes, and threw herself
ardently into the work. When the Woman's Christian Temperance
Union was organized in Chicago, Miss Willard became its president.
In 1879 she became the president of the National Union. Her work
was never-ending. She wrote books; she lectured all over the
country. For twelve years she held an average of one meeting a day.
Miss Willard had seen that unless women had the
right to assist in making laws, their cause was Favors woman
suffrage
hopeless. Accordingly she declared herself in favor
of woman suffrage. A few years later the Woman's Christian
Temperance Union followed their leader into politics in an effort to
encourage temperance legislation.
Miss Willard's work constantly became wider. The
organization of which she was the head became Women united
for the
international in its influence, and the World's protection of
Woman's Christian Temperance Union was the home
organized in 1883, with Miss Willard as president.
She had united the women of the world in a great league for the
protection of the home. Miss Willard remained to the end of her life
president of the World's Woman's Christian Temperance Union. She
died in 1898.
CLARA BARTON
From a photograph by Charles E. Smith,
Evanston, Illinois
223. Clara Barton. Clara Barton was born in
1821, near Oxford, Massachusetts. She was Clara Barton,
1821
educated to be a school teacher, and for many
years followed that profession. In 1861 she visited Washington, and
there felt the impulse that led to her great life work.
The injured soldiers from the first battles of the
Civil War were being brought to Washington. Miss Nurses the
wounded
Barton at once felt it her duty to help in caring for
them. She not only nursed the wounded, but she encouraged those
who were on the way to the line of battle.
224. Goes to the Battle Field. The men that were being taken to
the hospitals received no care until they arrived there. Miss Barton
saw that her place was on the battle field.
She secured a pass to the firing line, and for four
years she followed the Union soldiers. She was Constantly in
danger
constantly in danger; her clothing was pierced by
bullets, her face blackened by powder. But she was
undaunted. The soldiers needed her, and she must Received
pay
no

be there to help them. When she could, she nursed


wounded Confederate as well as Federal soldiers. She received no
pay for her work.
When the war was over Miss Barton went to
Europe. There she learned of the Red Cross Red Cross
Society in
Society, founded in Geneva in 1863. The purpose Europe
of the society was to care for the wounded of any
nation on the field of battle. A treaty among the nations agreed that
the Red Cross nurses should be safe from capture. Miss Barton was
asked to organize a branch of the Red Cross in the United States.
In 1882 President Arthur signed the treaty, and the
American Red Cross, with Miss Barton as its first American Red
Cross
president, was established. She continued as
president until 1904, when she resigned.
In 1896 Miss Barton went to Armenia at the head
of her Red Cross to relieve the suffering caused by Goes to
Armenia
the massacres. She saved thousands from
starvation and disease.
Again she nobly responded to the call of President McKinley to go to
the help of Cuba in the Spanish-American War.
Miss Barton lived to see the Red Cross a world-wide society carrying
comfort and cheer to all nations. In the World War after every great
battle the Red Cross nurses worked on the field or in the hospital to
lighten the awful sufferings of the wounded.
225. The Red Cross Society in Times of
Peace. It was Miss Barton's firm belief that the Work of the
society in times
world needed the services of the Red Cross in of peace
times of peace as well as in times of war.
Accordingly an amendment was made to the Geneva treaty. Local
Red Cross societies sprang up in every part of the country. The
suffering which followed the great Charleston earthquake, the
Galveston flood, forest fires, mine explosions, and all similar
accidents found the Red Cross Society on hand with aid and
supplies.
The greatest calamity that has befallen our country since the Red
Cross was well organized was the burning of San Francisco following
the great earthquake of 1906. Five hundred millions in property was
destroyed, and two hundred and fifty thousand people were left
homeless and without food. The Red Cross alone spent three million
dollars in giving aid to the sufferers.
An important new undertaking is the rural work of
the Red Cross. This is not limited to health Rural work of
the Red Cross
questions, though a nurse is the first person sent
into a country. But also if possible another worker is sent to help the
country people with their social problems, their amusements, and
the building up of a spirit of neighborhood coöperation.
JANE ADDAMS
From a recent photograph
226. Jane Addams. There was still another great
and vital field of service waiting for a leader. This Jane Addams
and the cause
was the cause of a better chance in life for the very of the poor
poor. A better understanding among all people, rich
and poor, and a knowledge of the interests which all have in
common are aiding in this. Education, reform of unjust working
conditions, and social service—the help or relief of poor or
unfortunate people—are all means of progress through which people
like Jane Addams have worked.
In 1883 while traveling in Europe, Jane Addams, a daughter of
wealthy and distinguished parents, was deeply touched by the
terrible poverty and misery she saw everywhere around her. She
herself had never known want or hunger. Indeed she had more
wealth than she knew how to spend for things she herself needed or
cared for.
She determined to devote herself and her fortune
to a fairer distribution of the world's goods and Devotes herself
to social service
pleasures among those who were always hungry
and in want. It was a vast undertaking, but Miss Addams was not
dismayed. She hoped that some day the rich and the educated
would see that all men are equal and would unite with the
unfortunate in one great brotherhood.
She returned to Chicago, and there with a group of
workers established a social settlement in a Hull House
Social
building in a poor quarter of the city and called it Settlement
Hull House. founded

There everyone, however poor, was welcomed. People could come


there for advice or help. Through personal influence they were led to
become acquainted with the best books, to cultivate their minds,
and to meet each other at times for study or social enjoyment.
Men and women from all parts of the country and
from abroad visited Hull House to see what Miss The settlement
a success
Addams and all her fellow-workers, through
personal service, were doing to make the lives of the poor people
around them a little brighter and happier. They found Hull House a
success. The neighborhood was like a great family whose members
sought each other's welfare. They regarded Miss Addams as one of
themselves. This was a bit of the human brotherhood of which Miss
Addams had dreamed.
227. What Has Been Accomplished. These
great women of whom we have read have worked Greater
opportunities
for the advancement, not alone of their sex, but of for women
all mankind in the United States and the world over.
Through their efforts great changes have taken place in woman's
position. Throughout the country she has a place more equal to
man's in the eyes of the law, almost unlimited opportunities in
education and business, and whatever openings in public life she
proves fitted for. Now looking back, we can see that the greater part
of what Elizabeth Cady Stanton and Susan B. Anthony so relentlessly
strove for has been gained. Woman suffrage will doubtless soon
cause the more backward states to give women full legal rights, and
it will also enable women to work more freely for the progress of the
nation.

SUGGESTIONS INTENDED TO HELP THE PUPIL


The Leading Facts. 1. Women shared the hardships and
dangers of the early colonists. 2. They did heroic service
during the Revolution and in the later progress of the
nation; but they had no legal or political rights. 3. Leaders
arose among the women demanding for their sex the
same rights and privileges that men had. 4. As a girl
Elizabeth Cady Stanton became indignant at what she
found to be the unequal position of women in almost
every walk of life; she resolved to devote her life to the
struggle for the rights of women. 5. In 1848 she called the
first woman's rights convention, where she made the first
public demand for woman suffrage. 6. She met Susan B.
Anthony, a school teacher, and won her to the cause. 7.
Together they organized the National Woman's Suffrage
Association. 8. Their great work succeeded in making
woman suffrage an election issue in many states. 9. By
1915 eleven states had been won to woman suffrage;
some voting rights had been won in twenty-two other
states.
10. Julia Ward Howe was the daughter of wealthy parents
and knew little of work. 11. She began to write poetry
early. 12. When the Civil War broke out Mrs. Howe wanted
to be of service to the Union. 13. She wrote "The Battle
Hymn of the Republic," a song that proved a great aid to
victory since it cheered the soldiers in the field. 14. After
the war Mrs. Howe established women's clubs in all parts
of the country for self-improvement among the women,
and for social service.
15. Harriet Beecher Stowe as a girl was apt at writing. 16.
She resolved to use her talent to help the slaves. 17.
Uncle Tom's Cabin helped the North to win the victory by
uniting the people against slavery. 18. Frances E. Willard
was raised in Wisconsin in frontier days. 19. In school she
stood at the head of her class. 20. Joined the anti-saloon
crusade; became president of the Woman's Christian
Temperance Union and later of the National Union. 21.
Declared herself in favor of woman suffrage. 22. As
president of the World's Woman's Christian Temperance
Union, Miss Willard united the women of the world in a
world union for the protection of the home. 23. Clara
Barton took up the work of nursing after the first battles
of the Civil War. 24. First in the hospitals of Washington,
she finally went to the battle fields in order to give the
wounded immediate help. 25. The Red Cross Society was
founded in Europe; a branch was established in the United
States by Miss Barton. 26. Following the great earthquake
and fire in San Francisco in 1906, the Red Cross did heroic
work in aiding the 250,000 people left homeless and
without food.
27. Jane Addams while traveling in Europe was touched by
the sight of the poverty and misery everywhere. 28. She
determined to devote herself and her fortune to make
better and brighter the lives of the poor. 29. She
established the Hull House Social Settlement in Chicago.
Study Questions. 1. How did women aid in the progress
of the nation? 2. What did they do during the Revolution?
during the Civil War? 3. What was their position in law and
in affairs of government? 4. Who was the first to
champion woman suffrage? 5. Describe Elizabeth Cady in
her girlhood. What was her opinion of boys and girls? 6.
To what did she determine to devote her life? 7. What was
the purpose of the woman's rights convention? 8. What
demand was first publicly made at this convention? 9.
What was Miss Anthony's occupation before she met Mrs.
Stanton? 10. Describe the work of these two women for
the cause of woman's rights. 11. In 1915 how many states
had granted women the right to vote? 12. Why did Julia
Ward Howe know so little of work? 13. What did she like
to do? 14. What sights did she see in Washington in 1861?
15. What did she do to serve her country? 16. How could
a song count much for victory? 17. What was the purpose
of women's clubs? 18. How did Harriet Beecher Stowe
serve her country? 19. What book did she write? What
was its effect? 20. Describe Frances Willard's girlhood, her
home, and surroundings. 21. Why did Miss Willard take up
temperance work? 22. Did Miss Willard work hard for
temperance, woman's rights, and protection of the home?
What makes you think so? 23. How did Miss Willard
become of international influence? 24. Where did Clara
Barton begin her work of nursing the wounded? 25.
Where did she go then, and why? 26. Where was the Red
Cross Society founded? 27. What was its purpose? 28.
What great service does it perform in time of peace? 29.
What was the result of the San Francisco earthquake? 30.
How did the Red Cross relieve the distress? 31. How did
the sight of poverty and suffering affect Jane Addams? 32.
What did she determine to do? 33. What did she establish
in Chicago? 34. What did the Social Settlement
accomplish? 35. Was it a success?
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!

ebookultra.com

You might also like