100% found this document useful (4 votes)
560 views

Complete Functional Programming in C#: How To Write Better C# Code 1st Edition Enrico Buonanno PDF For All Chapters

Functional

Uploaded by

yunussmardz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
560 views

Complete Functional Programming in C#: How To Write Better C# Code 1st Edition Enrico Buonanno PDF For All Chapters

Functional

Uploaded by

yunussmardz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

Download the full version of the textbook now at textbookfull.

com

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/

Explore and download more textbook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Functional Python Programming: Use a functional approach


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

Effective C An introduction to professional C programming


1st Edition Robert C. Seacord

https://textbookfull.com/product/effective-c-an-introduction-to-
professional-c-programming-1st-edition-robert-c-seacord/

textbookfull.com

Learn C++ by Example: Covers Versions 11 to 23 (Final


Release) 1 / converted Edition Frances Buontempo

https://textbookfull.com/product/learn-c-by-example-covers-
versions-11-to-23-final-release-1-converted-edition-frances-buontempo/

textbookfull.com

Hepatology A clinical textbook 10th Edition Stefan Mauss

https://textbookfull.com/product/hepatology-a-clinical-textbook-10th-
edition-stefan-mauss/

textbookfull.com
The Regulatory Regime of Food Safety in China: Governance
and Segmentation 1st Edition Guanqi Zhou (Auth.)

https://textbookfull.com/product/the-regulatory-regime-of-food-safety-
in-china-governance-and-segmentation-1st-edition-guanqi-zhou-auth/

textbookfull.com

English Language Teaching in Moroccan Higher Education


Hassan Belhiah Editor Ikbal Zeddari Editor Nourddine
Amrous Editor Jamal Bahmad Editor Nourdin Bejjit Editor
https://textbookfull.com/product/english-language-teaching-in-
moroccan-higher-education-hassan-belhiah-editor-ikbal-zeddari-editor-
nourddine-amrous-editor-jamal-bahmad-editor-nourdin-bejjit-editor/
textbookfull.com

Roland Barthes' Cinema 1st Edition Philip Watts

https://textbookfull.com/product/roland-barthes-cinema-1st-edition-
philip-watts/

textbookfull.com

Live from Nicaragua Uprising or Coup A Reader Various

https://textbookfull.com/product/live-from-nicaragua-uprising-or-coup-
a-reader-various/

textbookfull.com

Keynes’s Evolutionary Spirit: A Philosophical Journey


through His Work 1st Edition Muñoz-Bandala

https://textbookfull.com/product/keyness-evolutionary-spirit-a-
philosophical-journey-through-his-work-1st-edition-munoz-bandala/

textbookfull.com
A Doctorate and Beyond: Building a Career in Engineering
and the Physical Sciences 1st Edition Graham C. Goodwin

https://textbookfull.com/product/a-doctorate-and-beyond-building-a-
career-in-engineering-and-the-physical-sciences-1st-edition-graham-c-
goodwin/
textbookfull.com
Functional Programming in C#: How to
write better C# code
Enrico Buonanno
Copyright
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

©2018 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.


20 Baldwin Road
PO Box 761
Shelter Island, NY 11964

Development editor: Marina Michaels


Technical development editor: Joel Kotarski
Review editor: Aleksandar Dragosavljević
Project editor: Kevin Sullivan
Copyeditor: Andy Carroll
Proofreader: Melody Dolab
Technical proofreaders: Paul Louth, Jürgen Hoetzel
Typesetter: Gordan Salinovic
Cover designer: Leslie Haimes
Cartoons: Viseslav Radović,
Richard Sheppard
Graphic illustrations: Chuck Larson

ISBN 9781617293955

Printed in the United States of America

1 2 3 4 5 6 7 8 9 10 – EBM – 22 21 20 19 18 17
Dedication
To the little monkey...
Brief Table of Contents
Copyright

Brief Table of Contents

Table of Contents

Preface

Acknowledgments

About this Book

1. Core concepts

Chapter 1. Introducing functional programming

Chapter 2. Why function purity matters

Chapter 3. Designing function signatures and types

Chapter 4. Patterns in functional programming

Chapter 5. Designing programs with function composition

2. Becoming functional

Chapter 6. Functional error handling

Chapter 7. Structuring an application with functions

Chapter 8. Working effectively with multi-argument functions

Chapter 9. Thinking about data functionally

Chapter 10. Event sourcing: a functional approach to persistence

3. Advanced techniques

Chapter 11. Lazy computations, continuations, and the beauty of monadic composition

Chapter 12. Stateful programs and stateful computations

Chapter 13. Working with asynchronous computations

Chapter 14. Data streams and the Reactive Extensions

Chapter 15. An introduction to message-passing concurrency

Epilogue: what next?


Inverted chapter dependency graph

The core functions of FP

Index

List of Figures

List of Tables

List of Listings
Table of Contents
Copyright

Brief Table of Contents

Table of Contents

Preface

Acknowledgments

About this Book

1. Core concepts

Chapter 1. Introducing functional programming

1.1. What is this thing called functional programming?

1.1.1. Functions as first-class values

1.1.2. Avoiding state mutation

1.1.3. Writing programs with strong guarantees

1.2. How functional a language is C#?

1.2.1. The functional nature of LINQ 1.2.2.

Functional features in C# 6 and C# 7 1.2.3.

A more functional future for C#?

1.3. Thinking in functions

1.3.1. Functions as maps

1.3.2. Representing functions in C#

1.4. Higher-order functions

1.4.1. Functions that depend on other functions

1.4.2. Adapter functions

1.4.3. Functions that create other functions

1.5. Using HOFs to avoid duplication

1.5.1. Encapsulating setup and teardown into a HOF


1.5.2. Turning the using statement into a HOF

1.5.3. Tradeoffs of HOFs

1.6. Benefits of functional programming

Exercises

Summary

Chapter 2. Why function purity matters

2.1. What is function purity?

2.1.1. Purity and side effects

2.1.2. Strategies for managing side effects

2.2. Purity and concurrency

2.2.1. Pure functions parallelize well

2.2.2. Parallelizing impure functions

2.2.3. Avoiding state mutation

2.3. Purity and testability

2.3.1. In practice: a validation scenario

2.3.2. Bringing impure functions under test

2.3.3. Why testing impure functions is hard

2.3.4. Parameterized unit tests

2.3.5. Avoiding header interfaces

2.4. Purity and the evolution of computing

Exercises

Summary

Chapter 3. Designing function signatures and types

3.1. Function signature design

3.1.1. Arrow notation

3.1.2. How informative is a

signature?3.2. Capturing data with data

objects
3.2.1. Primitive types are often not specific enough

3.2.2. Constraining inputs with custom types 3.2.3.

Writing “honest” functions

3.2.4. Composing values with tuples and objects

3.3. Modeling the absence of data with Unit

3.3.1. Why void isn’t ideal

3.3.2. Bridging the gap between Action and Func with Unit

3.4. Modeling the possible absence of data with Option

3.4.1. The bad APIs you use every day

3.4.2. An introduction to the Option type

3.4.3. Implementing Option

3.4.4. Gaining robustness by using Option instead of null

3.4.5. Option as the natural result type of partial functions

Exercises

Summary

Chapter 4. Patterns in functional programming

4.1. Applying a function to a structure’s inner values

4.1.1. Mapping a function onto a sequence 4.1.2.

Mapping a function onto an Option 4.1.3. How

Option raises the level of abstraction 4.1.4.

Introducing functors

4.2. Performing side effects with ForEach

4.3. Chaining functions with Bind

4.3.1. Combining Option-returning functions

4.3.2. Flattening nested lists with Bind 4.3.3.

Actually, it’s called a monad

4.3.4. The Return function


4.3.5. Relation between functors and monads 4.4.

Filtering values with Where

4.5. Combining Option and IEnumerable with Bind

4.6. Coding at different levels of abstraction

4.6.1. Regular vs. elevated values

4.6.2. Crossing levels of abstraction

4.6.3. Map vs. Bind, revisited

4.6.4. Working at the right level of abstraction

Exercises

Summary

Chapter 5. Designing programs with function composition

5.1. Function composition

5.1.1. Brushing up on function composition

5.1.2. Method chaining

5.1.3. Composition in the elevated world

5.2. Thinking in terms of data flow

5.2.1. Using LINQ’s composable API

5.2.2. Writing functions that compose well

5.3. Programming workflows

5.3.1. A simple workflow for validation

5.3.2. Refactoring with data flow in mind

5.3.3. Composition leads to greater flexibility

5.4. An introduction to functional domain modeling

5.5. An end-to-end server-side workflow

5.5.1. Expressions vs. statements

5.5.2. Declarative vs. imperative

5.5.3. The functional take on layering


Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Exercises

Summary

2. Becoming functional

Chapter 6. Functional error handling

6.1. A safer way to represent outcomes

6.1.1. Capturing error details with Either

6.1.2. Core functions for working with Either

6.1.3. Comparing Option and Either

6.2. Chaining operations that may fail 6.3.

Validation: a perfect use case for Either

6.3.1. Choosing a suitable representation for errors

6.3.2. Defining an Either-based API

6.3.3. Adding validation logic

6.4. Representing outcomes to client applications

6.4.1. Exposing an Option-like interface

6.4.2. Exposing an Either-like interface

6.4.3. Returning a result DTO

6.5. Variations on the Either theme

6.5.1. Changing between different error representations

6.5.2. Specialized versions of Either

6.5.3. Refactoring to Validation and Exceptional

6.5.4. Leaving exceptions behind?

Exercises

Summary

Chapter 7. Structuring an application with functions

7.1. Partial application: supplying arguments piecemeal

7.1.1. Manually enabling partial application


7.1.2. Generalizing partial application

7.1.3. Order of arguments matters

7.2. Overcoming the quirks of method resolution

7.3. Curried functions: optimized for partial application

7.4. Creating a partial-application-friendly API

7.4.1. Types as documentation

7.4.2. Particularizing the data access function

7.5. Modularizing and composing an application

7.5.1. Modularity in OOP

7.5.2. Modularity in FP

7.5.3. Comparing the two approaches

7.5.4. Composing the application

7.6. Reducing a list to a single value

7.6.1. LINQ’s Aggregate method

7.6.2. Aggregating validation results

7.6.3. Harvesting validation errors

Exercises

Summary

Chapter 8. Working effectively with multi-argument functions

8.1. Function application in the elevated world

8.1.1. Understanding applicatives

8.1.2. Lifting functions

8.1.3. An introduction to property-based testing

8.2. Functors, applicatives, monads

8.3. The monad laws

8.3.1. Right identity

8.3.2. Left identity


8.3.3. Associativity

8.3.4. Using Bind with multi-argument functions

8.4. Improving readability by using LINQ with any monad

8.4.1. Using LINQ with arbitrary functors

8.4.2. Using LINQ with arbitrary monads

8.4.3. let, where, and other LINQ clauses

8.5. When to use Bind vs. Apply

8.5.1. Validation with smart constructors

8.5.2. Harvesting errors with the applicative flow

8.5.3. Failing fast with the monadic flow

Exercises

Summary

Chapter 9. Thinking about data functionally

9.1. The pitfalls of state mutation

9.2. Understanding state, identity, and change

9.2.1. Some things never change

9.2.2. Representing change without mutation

9.3. Enforcing immutability

9.3.1. Immutable all the way down

9.3.2. Copy methods without boilerplate?

9.3.3. Leveraging F# for data types

9.3.4. Comparing strategies for immutability: an ugly contest

9.4. A short introduction to functional data structures

9.4.1. The classic functional linked list

9.4.2. Binary trees

Exercises

Summary
Chapter 10. Event sourcing: a functional approach to persistence

10.1. Thinking functionally about data storage

10.1.1. Why data storage should be append-only

10.1.2. Relax, and forget about storing state

10.2. Event sourcing basics

10.2.1. Representing events

10.2.2. Persisting events

10.2.3. Representing state

10.2.4. An interlude on pattern matching

10.2.5. Representing state transitions

10.2.6. Reconstructing the current state from past events

10.3. Architecture of an event-sourced system

10.3.1. Handling commands

10.3.2. Handling events

10.3.3. Adding validation

10.3.4. Creating views of the data from events

10.4. Comparing different approaches to immutable storage

10.4.1. Datomic vs. Event Store

10.4.2. How event-driven is your

domain?Summary

3. Advanced techniques

Chapter 11. Lazy computations, continuations, and the beauty of monadic composition

11.1. The virtue of laziness

11.1.1. Lazy APIs for working with Option

11.1.2. Composing lazy computations

11.2. Exception handling with Try

11.2.1. Representing computations that may fail


11.2.2. Safely extracting information from a JSON object

11.2.3. Composing computations that may fail

11.2.4. Monadic composition: what does it mean?

11.3. Creating a middleware pipeline for DB access

11.3.1. Composing functions that perform setup/teardown

11.3.2. A recipe against the pyramid of doom

11.3.3. Capturing the essence of a middleware function

11.3.4. Implementing the query pattern for middleware

11.3.5. Adding middleware that times the operation

11.3.6. Adding middleware that manages a DB transaction

Summary

Chapter 12. Stateful programs and stateful computations

12.1. Programs that manage state

12.1.1. Maintaining a cache of retrieved resources

12.1.2. Refactoring for testability and error handling

12.1.3. Stateful computations

12.2. A language for generating random data

12.2.1. Generating random integers

12.2.2. Generating other primitives

12.2.3. Generating complex structures

12.3. A general pattern for stateful computations

Summary

Chapter 13. Working with asynchronous computations

13.1. Asynchronous computations

13.1.1. The need for asynchrony

13.1.2. Representing asynchronous operations with Task

13.1.3. Task as a container for a future value


13.1.4. Handling failure

13.1.5. An HTTP API for currency conversion

13.1.6. If it fails, try a few more times

13.1.7. Running asynchronous operations in parallel

13.2. Traversables: working with lists of elevated values

13.2.1. Validating a list of values with monadic Traverse

13.2.2. Harvesting validation errors with applicative Traverse

13.2.3. Applying multiple validators to a single value 13.2.4.

Using Traverse with Task to await multiple results 13.2.5.

Defining Traverse for single-value structures

13.3. Combining asynchrony and validation (or any other two monadic effects)

13.3.1. The problem of stacked monads

13.3.2. Reducing the number of effects

13.3.3. LINQ expressions with a monad stack

Summary

Chapter 14. Data streams and the Reactive Extensions

14.1. Representing data streams with IObservable

14.1.1. A sequence of values in time

14.1.2. Subscribing to an IObservable

14.2. Creating IObservables

14.2.1. Creating a timer

14.2.2. Using Subject to tell an IObservable when it should signal

14.2.3. Creating IObservables from callback-based subscriptions

14.2.4. Creating IObservables from simpler structures

14.3. Transforming and combining data streams

14.3.1. Stream transformations

14.3.2. Combining and partitioning streams


14.3.3. Error handling with IObservable

14.3.4. Putting it all together

14.4. Implementing logic that spans multiple events

14.4.1. Detecting sequences of pressed keys

14.4.2. Reacting to multiple event sources

14.4.3. Notifying when an account becomes overdrawn

14.5. When should you use IObservable?

Summary

Chapter 15. An introduction to message-passing concurrency

15.1. The need for shared mutable state

15.2. Understanding message-passing concurrency

15.2.1. Implementing agents in C#

15.2.2. Getting started with agents

15.2.3. Using agents to handle concurrent requests

15.2.4. Agents vs. actors

15.3. Functional APIs, agent-based implementations

15.3.1. Agents as implementation details

15.3.2. Hiding agents behind a conventional API

15.4. Message-passing concurrency in LOB applications

15.4.1. Using an agent to synchronize access to account data

15.4.2. Keeping a registry of accounts

15.4.3. An agent is not an object

15.4.4. Putting it all together

Summary Epilogue:

what next?

Inverted chapter dependency graph

The core functions of FP


Index

List of Figures

List of Tables

List of Listings
Preface
Today, functional programming (FP) is no longer brooding in the research departments of
universities; it has become an important and exciting part of mainstream programming. The
majority of the languages and frameworks created in the last decade are functional, leading some
to predict that the future of programming is functional. Meanwhile, popular object-oriented
languages like C# and Java see the introduction of more functional features with every new
release, enabling a multiparadigm programming style.

And yet, adoption in the C# community has been slow. Why is this so? One reason, I believe, is
the lack of good literature:

Most FP literature is written in and for functional languages, especially Haskell. For
developers with a background in OOP, this poses a programming-language barrier to
learning the concepts. Even though many of the concepts apply to a multiparadigm
language like C#, learning a new paradigm and a new language at once is a tall order.
Even more importantly, most of the books in the literature tend to illustrate functional
techniques and concepts with examples from the domains of mathematics or computer
science. For the majority of programmers who work on line-of-business (LOB)
applications day in and day out, this creates a domain gap and leaves them wondering how
relevant these techniques may be for real-world applications.

These shortcomings posed major stumbling blocks in my own path to learning FP. After tossing
aside the n-th book that explained something known as currying by showing how the add
function can be curried with the number 3, creating a function that can add 3 to any number (can
you think of any application where this would be even remotely useful?), I decided to pursue my
own research path. This involved learning half a dozen functional languages (some better than
others), and seeing which concepts from FP could be effectively applied in C# and in the kind of
applications most developers are paid to write, and it culminated in the writing of this book.

This book bridges the language gap for C# developers by showing how you can leverage
functional techniques in this language. It also bridges the domain gap by showing how these
techniques can be applied to typical business scenarios. I take a pragmatic approach and cover
functional techniques to the extent that they’re useful in a typical LOB application scenario, and
dispense with most of the theory behind FP.

Ultimately, you should care about FP because it gives you the following:

Power— This simply means that you can get more done with less code. FP raises the level
of abstraction, allowing you to write high-level code while freeing you from low-level
technicalities that add complexity but no value.
Safety— This is especially true when dealing with concurrency. A program written in the
imperative style may work well in a single-threaded implementation but cause all sorts of
bugs when concurrency comes in. Functional code offers much better guarantees in
concurrent scenarios, so it’s only natural that we’re seeing a surge of interest in FP in the
era of multicore processors.
Clarity— We spend more time maintaining and consuming existing code than writing new
code, so it’s important that our code be clear and intention-revealing. As you learn to think
functionally, achieving this clarity will become more natural.
If you’ve been programming in an object-oriented style for some time, it may take a bit of effort
and willingness to experiment before the concepts in this book come to fruition. To make sure
learning FP is an enjoyable and rewarding process, I have two recommendations:

Be patient— You may have to read some sections more than once. You may put the book
down for a few weeks and find that when you pick it up again, something that seemed
obscure suddenly starts to make sense.
Experiment in code— You won’t learn unless you get your hands dirty. The book
provides many examples and exercises, and many of the code snippets can be tested in the
REPL.

Your colleagues may be less eager to explore than you. Expect them to protest your adoption of
this new style and to look perplexed at your code and say things like, “why not just do x?”
(where x is boring, obsolete, and usually harmful). Don’t discuss. Just sit back and watch them
eventually turn around and use your techniques to solve issues they run into again and again.
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Acknowledgments
I’d like to thank Paul Louth, who not only provided inspiration through his LanguageExt library—
from which I borrowed many good ideas—but who also graciously reviewed the book at various
stages.

Manning’s thorough editorial process ensured that the quality of this book is infinitely better than
if I had been left to my own means. For this, I’d like to thank the team that collaborated on the
book, including Mike Stephens, development editor Marina Michaels, technical editor Joel
Kotarski, technical proofreader Jürgen Hoetzel, and copyeditor Andy Carroll.

Special thanks to Daniel Marbach and Tamir Dresher for their technical insights, as well as to all
those who took part in the peer reviews, including Alex Basile, Aurélien Gounot, Blair Leduc,
Chris Frank, Daniel Marbach, Devon Burriss, Gonzalo Barba López, Guy Smith, Kofi Sarfo,
Pauli Sutelainen, Russell Day, Tate Antrim, and Wayne Mather.

Thanks to Scott Wlaschin for sharing his articles at http://fsharpforfunandprofit.com, and to the
many other members of the FP community who share their knowledge and enthusiasm through
articles, blogs, and open source.
About this Book
This book aims to show how you can leverage functional techniques in C# to write code that is
concise, elegant, robust, and maintainable.
Who should read this book
This book is for an ambitious breed of developer. You know the C# language and the .NET
framework. You have experience developing real-world applications and are familiar with OOP
concepts, patterns, and best practices. Yet, you’re looking to expand your arsenal by learning
functional techniques so that you can make the most out of C# as a multiparadigm language.

If you’re trying or planning to learn a functional language, this book will also be hugely
valuable, because you’ll learn how to think functionally in a language you’re familiar with.
Changing the way you think is the hard part; once that’s achieved, learning the syntax of any
particular language will be relatively easy.
How this book is organized
The book consists of 15 chapters, divided into 3 parts:

Part 1 covers the basic techniques and principles of functional programming. We’ll start by
looking at what functional programming is and how C# supports programming in a
functional style. We’ll then look at the power of higher-order functions, function purity
and its relation to testability, the design of types and function signatures, and how simple
functions can be composed into complex programs. By the end of part 1, you’ll have a
good feel for what a program written in a functional style looks like and for the benefits
that this style has to offer.
With these basic concepts covered, we’ll pick up some speed in part 2 and move on to
wider-reaching concerns, such as functional error handling, modularizing and composing
an application, and the functional approach to understanding state and representing change.
By the end of part 2, you’ll have acquired a set of tools enabling you to effectively tackle
many programming tasks using a functional approach.
Part 3 will tackle more advanced topics, including lazy evaluation, stateful computations,
asynchrony, data streams, and concurrency. Each chapter in part 3 introduces important
techniques that have the potential to completely change the way you write and think about
software.

You’ll find a more detailed breakdown of the topics in each chapter, and a representation of what
chapters are required before reading any particular chapter, on the inside front cover page.

Coding for real-world applications

The book aims to stay true to real-world scenarios. To do this, many examples deal with practical
tasks such as reading configuration, connecting to a database, validating HTTP requests, and so
on—things you may already know how to do, but you’ll see them with the fresh perspective of
functional thinking.

Throughout the book, I use a long-running example to illustrate how FP can help when writing
LOB applications. For this, I’ve chosen an online banking application for the fictitious Bank of
Codeland (BOC)—naff, I know, but at least it has the obligatory three-letter acronym. Because
most people have access to an online banking facility, it should be easy to imagine the required
functionality and plain to see how the problems discussed are relevant to real-world applications.

I also use scenarios to illustrate how to solve typical programming problems in a functional style.
The constant back and forth between practical examples and FP concepts will hopefully help
bridge the gap between theory and practice—something I found wanting in the existing
literature, as I mentioned.

Leveraging functional libraries

A language like C# may have functional features, but to fully leverage these you’ll often use
libraries that facilitate common tasks. Microsoft has provided several libraries that facilitate
programming in a functional style, including these:

System.Linq—Yes, in case you didn’t know, it’s a functional library! I assume you’re
familiar with it, given that it’s such an important part of .NET.
System.Collections.Immutable—This is a library of immutable collections, which we’ll start
using in chapter 9.
System.Reactive—This is an implementation of the Reactive Extensions for .NET, allowing
you to work with data streams, which we’ll discuss in chapter 14.

This still leaves out plenty of other important types and functions that are staples of FP. As a
result, several independent developers have written libraries to fill those gaps. To date, the most
complete of these is LanguageExt, a library written by Paul Louth to improve the C# developer’s
experience when coding functionally.[1]
1

LanguageExt is open source and available on GitHub and NuGet:


https://github.com/louthy/language-ext.

In the book, I don’t use LanguageExt directly; instead, I’ll show you how I developed my own
library of functional utilities, called LaYumba.Functional, even though it largely overlaps with
LanguageExt. This is pedagogically more useful, for several reasons:

The code will remain stable after the book is published.


You get to look under the hood and see that powerful functional constructs are deceptively
simple to define.
You can concentrate on the essentials: I’ll show you the constructs in their purest form, so
that you won’t be distracted by the details and edge cases that a full-fledged library
addresses.
Random documents with unrelated
content Scribd suggests to you:
I found him a very intelligent man, and one who is very anxious to
see the colored people advance in every department of life. He feels
that they must be engaged in all lines of work and business in order
that they may succeed.
MISSISSIPPI COTTON MANUFACTURING COMPANY.
This company is located at Jackson, Miss., for the purpose of
building a large cotton mill where colored labor only will be
employed.
On nearly every sidewalk, at every railway station from the country
store to the great city, the highways are crowded with idle colored
boys. It is very difficult for them to find employment in the
commercial pursuits of any kind. They would gladly seize an
opportunity to earn a livelihood along the industrial lines if they were
permitted. Hence the necessity of the erection of the cotton factory.
The Mississippi Cotton Manufacturing Company is incorporated under
the laws of the State of Mississippi for the purpose of manufacturing
cotton and woolen goods and such other articles as the directors
from time to time may see fit. Such an enterprise was proposed by
the lamented Frederick Douglass in 1893, who was president of the
Freedom Manufacturing Company, of which Hon. James Hill was
vice-president. Owing to the money panic of '93, Mr. Douglass
decided to wait until after the panic had subsided and business
confidence was restored. On the eve of this restoration of business
confidence Mr. Douglass died. The idea has heretofore prevailed that
the negro is not competent to manage or operate any manufacturing
concern or any great business enterprise. We cannot yield assent to
that idea. The young people who are being educated in the various
colleges of this country should not all seek to go into the
professions, and the main object of this company is to build this
factory and give the deserving boys and girls in that State an
opportunity to follow the industrial as well as the professional walks
of life.
The capital stock of the company is $250,000. The shares of stock
are placed at $10 each. Any person, however, can purchase as many
shares of stock as he may desire.
Mississippi is one of the greatest cotton-producing States in the
Union, and the negro produces the major part of said product, and
he should feel a deep interest in the manufacture of this raw
material, thereby doing something to advance civilization and adding
something substantial to the commonwealth and the welfare of its
people.

HON. JAMES HILL.


President of Cotton Mill Company.

Hon. James Hill is president of the above company. Mr. Hill is a man
of high standing and well known in all parts of this country. He has
been a political leader for years, and has held some very important
positions. He was at one time Postmaster of Vicksburg, Miss., the
largest town in the State. Mr. Hill is now, in 1900, in the United
States Land Office at Jackson, Miss. He was appointed to this
position by President McKinley.
Rev. E. W. Lampton, first vice-president of the company, is also a
well-known man. He has been a very active man in the A. M. E.
Church. His home is at Greenville, Miss., where he owns valuable
property. Mr. Lampton has been at the head of the Masonic order for
the State of Mississippi, and thousands of dollars have been
disbursed by him for the benefit of widows and orphans annually.
MR. EUGENE BURKINS.
EUGENE BURKINS,
Inventor of the Burkins Automatic Machine-Gun.

Eugene Burkins, inventor of the "Burkins Automatic Machine-Gun,"


was at one time a bootblack in the city of Chicago. He never had any
education outside of learning how to read and write. Nor had he
ever been a soldier, or had any experience with guns of any
description; and for that reason his invention is all the more
wonderful. He began first to make a careful study of the picture that
appeared in the papers, showing the guns on the "Battleship Maine."
Mr. Burkins saw in what way he could improve the machine-gun by
increasing its rapid-firing capacity, and along that line he began to
work. His first model was mostly made with a pocket-knife. Some of
the leading colored people helped him secure his patent. Mr.
Madden, a wealthy man in Chicago, furnished over $3,000 to make a
perfect model. Admiral Dewey said it was "by far the best machine-
gun ever made." It shoots seven times more a minute than the
Gatling gun, and will doubtless take the place of other machine-
guns. Several foreign countries have offered large sums for the right
to manufacture it for their navies; but Mr. Burkins and Mr. Madden,
his partner, proposed to control the manufacturing interest in this
country.
MR. GEO. E. JONES.
MR. GEO. E. JONES.

Mr. Geo. E. Jones, of Little Rock, Ark., is beyond doubt one of the
most successful business men among the colored people. He began
life a very poor boy, without friends or capital, and has by hard work
and close economy placed himself among the most prominent
business men of his city. Mr. Jones is engaged in the undertaking
business, and can say what no other colored man engaged in that
line of work in the South can say, and that is—he has about as much
patronage among the white people as he has with his own race. Mr.
Jones first started in business as a merchant on a small amount of
money, and finally worked into the undertaking business. He owns
now in Little Rock quite a large amount of property, and among the
different buildings there he has two large brick blocks, one on Main
street, where he has his undertaking establishment, and one on
West Ninth street, which is rented. In the Ninth street block Mr.
Jones has in one room a fine drug store, which he employs a young
druggist to attend to. He owns a fine lot of horses and carriages
used in his business as an undertaker. His residence is by far the
best furnished home I ever saw owned by a colored man. Mrs.
Jones, his wife, is a very refined and cultured lady.
MR. G. W. HIGGINS.

MR. G. W. HIGGINS.

G. W. Higgins was born in South Carolina, and lived for some time at
Newberry, S. C. He began at an early age to acquire an education in
order that he might be of some help to himself and race. Mr. Higgins
attended Biddle University at Charlotte, N. C., where he took a
course in theology. He was at one time principal of the public school
at Old Fort, N. C., and while teaching there he established a
Presbyterian Church, which is still in existence. After leaving the
Presbyterian work he joined the A. M. E. Zion Connection, and was
appointed pastor at Abington, Va., and afterwards at Johnson City,
Tenn. There he became interested in the industrial advancement of
the colored people, and set about to learn some trade, and secured
work in a first-class steam laundry, and learned the business
thoroughly, and afterwards operated a laundry of his own. Mr.
Higgins came to Cincinnati, O., in 1893 and secured employment
with the Oil and Grease Company of Chas. H. Moore & Co. After five
years of faithful work for that firm he became an expert in the
compounding of the oils and greases made by the firm, and was
offered a larger salary by Burchard & Co., of Cincinnati, who are
refiners of lard oil. For this firm, Mr. Higgins has charge as foreman
of the oil and grease department. He is much thought of by his
employers.
MR. A. MEANS.
A. Means, of Memphis, Tenn., is a practical hatter, and is the only
colored man I know of engaged in that line of work. He has a large
trade and keeps on hand a select assortment of the latest styles in
hats and caps. Mr. Means does a large business in cleaning and
repairing hats.
MR. J. E. HENDERSON.
J. E. Henderson, of Little Rock, Ark., is engaged in the jewelry
business. Mr. Henderson is regarded as a good workman in his line,
and for some years before he began business for himself he did the
repair work for one of the leading jewelry houses of Little Rock. He
gets a great deal of his work now from the white people. I hope
before many years to see a larger number of colored men engaged
in the jewelry trade.
SOUTHERN MERCANTILE COMPANY.
The Southern Mercantile Company, Pine Bluff, Ark., is a company of
excellent business men, who are demonstrating that colored men
can manage a successful business enterprise. They handle a large
stock of dry goods, groceries, boots and shoes and plantation
supplies. They do both a wholesale and retail business. The firm has
in it such men as Wiley Jones, Fred. Havis, who is president of the
company, and Mr. M. R. Perry, as secretary and treasurer. Mr. Perry is
a graduate from one of the best schools in the country and regarded
as a splendid business man.
MR. L. CARTER.
L. Carter, of Greenville, Miss., was born of slave parents at Carthage,
Tenn. He has been in Mississippi since 1866. Mr. Carter owns and
operates the only large book store in the country owned by a
colored man. He keeps a splendid stock of school books, blank
books, stationery, periodicals and a good assortment of story books
and toys. In speaking of where he got the greater part of his
support, he said that at least two-thirds of his patronage came from
the white people, and among the best class of them. Mr. Carter
owns good property in Greenville as a residence, and is regarded as
one of the prominent citizens.
DAVIS & ROBINSON.
Davis & Robinson, of Jacksonville, Fla., are the leading commission
merchants of that city. They do both a wholesale and retail business
in oranges, fruits, strawberries, northern produce, turkeys, chickens,
eggs, early vegetables. They handle melons in car-load lots and keep
all kinds of game in season. They also supply the large hotels there
with all they need in their line. Both of these men are respected and
regarded as excellent business men by the leading people.
MRS. ELLA HENDERSON.
Mrs. Ella Henderson, who is located at Natchez, Miss., has opened a
very excellent millinery store, where she keeps a splendid stock of
goods in that line of trade. As I have stated in other parts of this
book, there are very few colored ladies engaged in the millinery
business. This is to be regretted, for there is an opening for some
one to do well in all towns where the colored population is large.
Mrs. Henderson has taken special training to thoroughly prepare
herself for the successful management of her business. She started
in a small way, and has twice since she opened her store had to
enlarge the room in order to meet the demands of her trade. She
buys her stock from the best houses in the country. The travelling
salesmen who visit the town with millinery goods call on her and
give her the same attention to secure her patronage as they do the
white ladies in the same business. I hope that many colored ladies
who may read this short sketch will be inspired to at least try and
start some kind of business.
RISHER BAKERY COMPANY.
Mr. H. T. Risher, of Jackson, Miss., who owns and operates a very
large and successful bakery business, has taken a new departure in
the line of business for colored people. I have only found two men
engaged in that line of work. One was Mr. Jones, at Danville, Va.,
and Mr. Risher, of Jackson. His place of business is equipped with all
the modern appliances for a first-class bake shop. Mr. Risher's trade
extends to many of the towns in the State, where he supplies
merchants who sell his bread. He has several delivery wagons that
are used to supply his city patrons. Mr. Risher is regarded as a very
excellent man, who is much interested in all that will advance the
cause of his race in a business and educational way. He has been
one of the leading spirits in building up Campbell College at Jackson,
one of the A. M. E. schools. Mr. Risher owns splendid property and
enjoys the respect of both white and colored people.
MR. F. B. COFFIN.
F. B. Coffin, of Little Rock, Ark., is a druggist by profession. He
operates a very fine drug store at Little Rock for Mr. Geo. E. Jones.
Mr. Coffin is a graduate from Meharry Medical College, at Nashville,
Tenn. In addition to his work as a druggist he has written a book of
poems, entitled "Coffin's Poems." The book has 248 pages, and
contains some very interesting matter, which shows his ability as a
writer. Part of his book is devoted to the question of Lynch law, and
he speaks out like a true and brave man against that awful curse to
this country.
MR. J. E. BUSH.
J. E. Bush was born in Moscow, Tenn., in 1856. His parents moved to
Arkansas during the rebellious unpleasantness of 1862. At an early
age he manifested the energy and self-reliance that has developed
him into the useful prominence of a worthy and highly respected
citizen. He earned his tuition at school by moulding brick. He may
have made "bricks without straw," but his manliness has never
allowed him to complain of the many hardships he has endured to
overcome the difficulties in his experience or surmount the obstacles
with which he has so often been brought into contact. Mr. Bush was
educated in the schools of Little Rock, Ark. He has been successful in
life and owns valuable property there. He has also held some
important political positions, and was appointed in 1898 by President
McKinley as Receiver of the United States Land Office at Little Rock.
DR. G. W. BELL.
Dr. G. W. Bell, of Pine Bluff, Ark., is a graduate of Lincoln University,
and he took his medical training at "The University of Michigan." He
has a very large practice. Dr. Bell has established, in connection with
his profession, a private sanitarium for the benefit of those who
come to him from a distance for treatment. He has built a
comfortable building for that purpose, and I think it is the only
institution of the kind carried on by a colored doctor in the State.
MISS MATTIE JENNETE JOHNSON.
Miss Mattie J. Johnson is employed as a saleslady in Siegel, Cooper
& Company's large store in the city of Chicago. She began work for
them in 1893, and has been there ever since. Miss Johnson is in the
grocery department, and is looked upon by her employers as one of
the most competent women in their store. She has many warm
friends among the patrons of the establishment. While Miss Johnson
is the first colored lady thus employed, knowing that she was
colored when they engaged her, I am sure she will not be the last,
and I hope many young women will prepare themselves for some
useful place.
DR. T. M. DORAM, M. D. V.

DR. T. M. DORAM, M. D. V.

Dr. Doram will doubtless be quite a bit of interest to the readers of


this book, from the fact that he is the first and only negro graduate
to receive a diploma from a veterinary college in the United States.
He was born in Danville, Ky., where his parents own valuable farm
land. His father was a carpenter, and when Dr. Doram was young he
worked with him at the trade. After he had finished at the public
school, in 1892, he entered Eckstein Norton University at Cane
Spring, Ky. While there the building was destroyed by fire. Dr. Doram
then found his knowledge of the carpenter's trade of great value to
him and the school, in helping to rebuild the college building. In
1896 he entered the McKillip Veterinary College at Chicago, Ill. At
the close of the first year he was at the head of his class in materia
medica, and the second year he led his class in pharmacy, and
during his last year he was made senior instructor of his class, an
honor of which he may be justly proud. In 1899, when he
graduated, he came to Evanston, Ill., where he enjoys a good
practice, and he is called in his profession by the best people in that
very wealthy and aristocratic community. I very much hope that a
few at least of the young colored men who may read this sketch
may be inspired to take up the profession of veterinary medicine and
surgery, for I am confident that many could succeed in different
parts of the country.
MR. J. W. ADAMS.
MR. J. W. ADAMS.

In presenting a few words about Mr. J. W. Adams and his business I


feel that I am doing the people at large a great favor to give them
an opportunity to know something about this eminently successful
colored business man. My attention was first called to Mr. Adams by
Prof. Booker T. Washington while I was lecturing at Tuskegee. I
changed my plans somewhat in order that I might visit Montgomery,
Ala., and see both the man and his place of business. Mr. Adams was
born in 1867. He began business for himself about 1899. But before
that he picked up some knowledge of business by working for a
large clothing house in Montgomery. He first went there as a porter,
but in time they allowed him to sell goods. Mr. Adams always saved
his money, and when he had about three hundred and fifty dollars
he decided to make an effort for himself. He now operates a large
store, where he sells dry goods, clothing, millinery, boots and shoes,
hats, caps, trunks, notions, etc. Mr. Adams carries a stock of over
twenty thousand dollars, and his store covers over four thousand
square feet; but he first started in a room only 18 by 19 feet. His
patrons are about evenly divided between white and colored people.
He gives employment to a large number of clerks, all colored. In the
millinery department I found two young ladies who had learned their
trade at Tuskegee. Many of the white ladies in Montgomery buy their
hats at Mr. Adams' store. I need not tell you that he is of great
importance and help to the race, for we all know what a great
inspiration such a man must be in stimulating a feeling among young
men to at least try to build up some business interest.
MR. H. A. LOVELESS.

MR. H. A. LOVELESS.
Mr. H. A. Loveless is also a resident of Montgomery, Ala., and must
be classed among the successful business men of the race. He, like
Mr. Adams, began business on a small scale, and by hard work and
an untiring effort he has made a showing no man need to be
ashamed of. Mr. Loveless operates a coal and wood yard, where he
gives employment to a large force of men. He also owns teams and
does general hauling, and has nine fine carriages that are kept on
the street for the benefit of the general public. Then, in addition to
what I have referred, Mr. Loveless has a very large undertaker's
establishment, which also gives quite a number of people
employment. He owns fine town property, and is regarded by both
white and colored people as a very excellent man. He takes an
active part in church work, and is especially interested in every
movement that will advance the colored people in the development
of business interest. He along with other leading men of the race
feel that industrial education, and a good business training for the
young, will prove a great factor in the solution of what we call a
"race problem."
PROF. R. B. HUDSON.
PROF. R. B. HUDSON.

Prof. R. B. Hudson is a resident of Selma, Ala., where he is principal


of the city school for colored youths. The school is a very large one,
and is regarded by such men as B. T. Washington, W. H. Councill and
others as the best public school in the State. Mr. Hudson has been
very active in educational and religious work, and for over fifteen
years has been superintendent of a large Sunday-school, and
president of the largest District Sunday-school Convention in the
State. He is also secretary for the Baptist State Convention, and
statistician for the Baptist denomination in the State. Prof. Hudson
was for six years secretary of the State Teachers' Association, and
was then elevated to the presidency. So one can see that in a
religious and educational work Mr. Hudson has been a very useful
man, and I am glad to inform my readers that he has also done
something in a business way, that is of great value to the race in
starting a large coal and wood yard in Selma, where he gives
employment to quite a force of men. There are six coal and wood
yards in the city, and Prof. Hudson has the second in size. His
business in that line brings him an income of over ten thousand
dollars per year, and his customers are made up of all classes,
among them bankers, lawyers and leading merchants among the
white people. Prof. Hudson is still young, and I am sure has a great
future ahead of him.
DR. L. L. BURWELL.
Dr. Burwell is also a resident of Selma, Ala., and a young man the
people seem very fond of. He worked his way through school and
graduated with high honors at Selma University, after which he
entered Leonard Medical College, at Raleigh, N. C., and by hard work
finished the four-year course in three. Dr. Burwell located at Selma,
and has built up a very extensive practice. He owns valuable
property, and operates one of the largest drug stores in the South,
and perhaps the largest owned by a colored man. The country
people have great confidence in him, not only as a physician, but as
a splendid business man, and from far in the country people come to
get his opinion on some business matter. In our late war with Spain
the doctor induced over thirty colored men to enlist, on the ground
that they ought to show their loyalty to the American government. I
regret that I am unable to present a picture of the doctor.
JOHN M. BROWN.
Mr. John M. Brown is to me a very interesting character. My attention
was first called to him by a white man who sells the goods
manufactured by Mr. Brown. The white man was a Southerner, but
seemed quite proud of him. He is located in Macon, Ga., and
operates a broom factory on quite a large scale, so much so that
most of the time he has fifteen people employed. He makes only a
high grade of brooms and sells them to the white merchants. Mr.
Brown does not send out a white man to sell his goods, but goes
himself and presents his claim for their patronage on the merits of
his manufactured article. I am glad to tell my readers that only on
one or two occasions has his color been a hindrance to him in the
State of Georgia, as far as the sale of his brooms are concerned.
Just one other point of interest that will, I am sure, be appreciated,
and that is, Mr. Brown has taught colored men the trade of broom
making, and employs only members of the race.
MR. CHARLES W. CHESTNUT.
Few people are aware of the fact that Mr. Charles W. Chestnut,
whose volumes of character sketches and short stories have made
him famous, is a colored man. His home is in Cleveland, and to meet
him on the street one would take him for a clerk in a store rather
than an author. Until within the past couple of years Mr. Chestnut
was a court stenographer in Cleveland and employed several
assistants. He has reported dozens of large conventions in this city,
and he is known to thousands as a stenographer. Mr. Chestnut is of
medium size and of very slight build. His hair is light and he has a
small, light mustache. His hair has a slight tendency to kink, but this
is hardly noticeable. His complexion is very fair, so much so that
many Cleveland people believe him a white man.
PROVIDENT HOSPITAL.
Provident Hospital and Training School, St. Louis, Mo., opened for
the care of colored patients in this city on the 4th day of April, 1899,
with a staff of nine colored physicians and a consulting staff of nine
white.
It has a Board of Managers composed of colored citizens of this city,
it is a regular chartered institution, and has a capacity of fifteen
beds, modern operating room, and three young colored women in
training. Some of the most difficult operations known to surgery
have been performed at the hospital during the past year. The
hospital has been furnished entirely by the colored people of this
city.
This institution meets a long-felt want, as the colored people are not
admitted to the white hospitals in St. Louis. Miss J. E. Valentine, a
graduate of the Freedmen's Hospital Training School, is head nurse.
The course in the training school is two years.
Dr. Samuel P. Stafford, a graduate of the Medical Department of the
University of Pennsylvania, and lately one of the internes of
Freedmen's Hospital and Douglass Hospital, is the physician in
charge. The future of the hospital is full of hope and growing in
usefulness. Dr. Curtis is President of the Board of Managers; W. E.
Jackson, Secretary; C. H. Dodge, Treasurer.
This data should have appeared in chapter twenty-five on Hospitals
and Homes, but came too late. It, however, will be of interest to my
readers.
WARREN KING.
Mr. Warren King, of Cincinnati, Ohio, is making a most excellent
impression among the better class of white people as to his
qualifications as a splendid business man. Mr. King has taken charge
of the restaurant in what is known as the Cumberland Flats. Only the
very best people live in those Flats, and they must be persons of
means to afford it. Mr. King boards all who live in those magnificent
buildings. He has a great many friends, and is regarded by those
who take meals in his restaurant as a most excellent manager.
J. A. BRABOY & SONS.
I have stated in several places in this book that colored people are
here and there engaging in all kinds of business. It is with pleasure
that I call attention to Mr. J. A. Braboy & Sons, of Kokomo, Ind.
These gentlemen operate what is known as a "Temple of Music."
They keep on hand a good assortment of high grade pianos and
organs; in fact, they handle only the best that is on the market. In
addition to their stock of pianos and organs, they keep a general line
of music and musical instruments. Mr. Braboy owns splendid
property, and is respected by the leading people in Kokomo.
MR. Z. E. WALKER.
Mr. Z. E. Walker, of Sumter, S. C., is one of the most successful
merchants in that city. He operates what is known as a general
store, where all kinds of goods are sold. He owns a great deal of
very valuable property in town and one or two plantations in the
country. He stands high in business, church and society. Mr. Walker
began business with a very small amount of money, but is now
looked upon as a very well-to-do man.
MR. W. G. JOHNSON.
Mr. W. G. Johnson, of Macon, Ga., has one of the best shoe stores in
that city. His stock is not only large, but is in every way up to date.
Mr. Johnson feels that if he buys the best goods made his people,
and especially the better class of colored people, cannot have that
as an excuse for giving their patronage to the white merchants.
Aside from his shoe store, he owns some very excellent property; in
fact, he owns the whole block in which his store is kept. He is a
young man, and I believe has a useful future before him.
JAMES A. JOYCE.
Mr. James A. Joyce, of Cleveland, Ohio, is employed by the King Iron
Bridge Co. of that city. Mr. Joyce is the only colored man engaged as
a bridge draftsman in the U. S. A. His work for that company is
making designs for high grade bridge work. Mr. Joyce has on several
occasions been sent out on large contracts to oversee the
construction of some very difficult work in their line. I am sorry that
I am unable to give a picture of Mr. Joyce in connection with this
brief mention of what I regard as a very important character in race
history.
R. B. FITZGERALD.
Mr. Fitzgerald is a resident of Durham, N. C., and is one of the
largest brick manufacturers in the United States. He makes a
specialty of fine and ornamental brick. Mr. Fitzgerald lives in one of
the handsomest residences in Durham. He is also interested in what
is known as the Durham Real Estate, Mercantile and Manufacturing
Company. It is not a "trust" or grasping monopoly; on the contrary, it
is a trust for the people, through which, on the most generous plan,
they can with absolute safety and ease become stockholders, do
business and become factors in the mercantile world.
This corporation is formed under the laws of the State of North
Carolina to promote manufacturing and mercantile interests, thus
becoming a factor in the development of nature's resources as they
exist in North Carolina, thereby opening up an avenue heretofore
unknown to colored people.
The shares are low, within the reach of all. For $10.00 one can
become a stockholder and will be entitled to an equal share of all
profit, which dividends will be declared and paid at such periods as
will be designated by their by-laws.
With ample capital, backed by such well known parties as R. B.
Fitzgerald, P. H. Smith, D. A. Lane, and others, under its agreements
consolidating large interests, it is able to provide homes and
investments, large or small, at a great benefit to its patrons, and,
with absolute safety and ease, enable one to become the owner of
the most precious thing on earth—a home for his family.
HOSPITAL AND TRAINING SCHOOL FOR NURSES.
The hospital and training school located at Charleston, S. C., was
organized in 1897, for the purpose of training colored women as
nurses. That such an institution was needed in that community is
evidenced by the fact that their nurses are always in demand, and
graduates find ready employment.
Students have been admitted to the institution, not only from
Charleston and vicinity, but from all parts of this State, and from
some adjoining States.
The course extends through two years, the first year being devoted
to lectures and practical work in the hospital, and the second year to
practical work in the hospital and to outside cases.
Thorough training is given in all branches of the nurse's profession,
including the nursing of surgical cases. Tuition is free, and nurses
are given board and lodging in the hospital building. Candidates for
admission to the training school must be of good character, in good
health, and have a common school education.
Further information may be procured by addressing the Surgeon-in-
Chief, Dr. A. C. McClennan, at the hospital, No. 135 Cannon St.,
Charleston, S. C.
The general public is asked to give what aid they can for the support
and development of this most worthy institution. If those who have
means to give would take into consideration that by educating some
young colored lady as a trained nurse they have helped one more of
the race to leave somebody's cook kitchen, and enter a life where
they can not only be self-sustaining, but their position would give
both dignity and standing to the race.
Dr. A. C. McClennan, who is in charge of the hospital, I found a very
pleasant gentleman, and one who is kept busy with a large practice
outside of the hospital work. This information came too late to be
mentioned with other such institutions written up in my book.
DR. L. J. HARRIS.
Dr. L. J. Harris is a native of Virginia and a son of Samuel Harris, of
Williamsburg, the noted merchant referred to on page 300 of this
book. Dr. Harris is a graduate of Harvard, and has taken a special
course of study in the treatment of the eye, ear, nose and throat,
and has located in Boston, and gives all of his time to this special
work. There have been a large number of colored doctors educated,
and I think that, as a rule, they are succeeding in their profession as
regular practitioners. But Dr. Harris is the first to establish himself as
a specialist. We most certainly wish him well in this departure from a
regular line of practice, and hope his success may inspire other
young men to follow in his footsteps.
MR. EDWARD C. BERRY.
MR. E. C. BERRY.

Mr. E. C. Berry, owner and proprietor of a $60,000 hotel at Athens,


Ohio, is a man that I feel the world ought to know. He was born at
Oberlin, Ohio, in 1855; his education was received at Albany, a
hamlet in Athens county. When fifteen years of age he went to
Athens and was employed as a hodcarrier on the Hospital for the
Insane, then in course of building. Mr. Berry was married in 1875,
and for a time he boarded his wife at his own people's home. His
first business venture was a lunch counter, which he started without
any means, and was already $40.00 in debt. After he had got fairly
started his wife joined him, and in 1878 they opened a restaurant in
a small building on the site of the present hotel, and Mr. Berry's
peculiar talent for serving palatable viands made him the popular
caterer of the town. His restaurant was often patronized by traveling
men who would arrive too late to get a meal at the hotel, and
because of the most excellent meals served at his restaurant those
men would ask, Why do you not open a hotel? and at the same time
would say, If you will, you can count on my being one of your
patrons. So many of those who took meals at his restaurant said
about the same thing to him that he felt encouraged to make the
effort. In 1892 Mr. Berry purchased the adjoining building and
commenced the erection of a twenty-room hotel. From the very first
the business paid; the house was new, neat and clean, and always
full of people, so much so that Mr. Berry soon found that his house
was inadequate for the business. In 1894 he built two large sample
rooms, over which he arranged four more sleeping rooms. But one
year later was—because of the increase in his trade—forced to again
enlarge his house. Up to that time he had spent very near five
thousand dollars in improvements. In 1899 Mr. Berry enlarged his
house to its present capacity, which is forty-six sleeping rooms, a
dining room with a seating capacity of seventy-five, a light, well-
ventilated room used exclusively for writing 20 by 40 feet, one
reading room 15 by 30 feet, four good, light sample rooms on
ground floor, and the whole house is heated with three large hot-
water heaters, with public bath-rooms on each floor, and several
rooms with bath. The success that has come to Mr. Berry in the hotel
business is due wholly to the fact that he is a natural-born caterer
and a splendid manager. I have traveled for years in this and other
countries, and I am free to say that the "Hotel Berry" is one of the
best furnished houses I ever saw. Mr. Berry gives his personal
attention to every detail that will make those who are guests in his
house comfortable. His trade comes only from the best people on
the road. He employs two clerks, one white and one colored.
Colored people who are refined and represent the same class of
whites who stop there are never turned away. I was pleased to hear
him say that much of his success was due to the constant oversight
his wife had of affairs in the inside management of the house. I only
wish I could write an article that would paint a word-picture strong
enough to make the American people see what a magnificent hotel
Mr. Berry really keeps. Aside from his very busy life, he finds time to
do a lot of church work, and is looked upon as the leading man in
the colored Baptist church of Athens.

E. C. BERRY'S $60,000 HOTEL.

MR. DUMAR WATKINS.


MR. DUMAR WATKINS.

Dumar Watkins is another member of the race who should be known


by the American people at large. Mr. Watkins is holding a position
and doing a line of work that has never been done by any colored
man in connection with a white institution such as the one with
which he is associated. My attention was called to him while
lecturing at Princeton, N. J., by Rev. J. Q. Johnson. I am sure it will
be as much a surprise to my readers, and I hope as much of a
pleasure, as it was to me, when I learned that the pathologist of
Princeton University was a colored man in the person of Dumar
Watkins. When we called upon him we found him at his work,
preparing some pathological slides for microscopic use. He is much
liked at the university, and is considered very proficient in his work.
The picture I present here of Mr. Watkins is a splendid likeness of
the man. I need not tell my readers that Princeton University is
regarded as one of the greatest schools in the world, and it ought to
very much increase the colored people's race pride to know that a
member of the race holds such a position there as Mr. Watkins
occupies.
MR. LEWIS H. LATIMER.

MR. LEWIS H. LATIMER.

Lewis H. Latimer, of New York city, is the only member of the race
engaged in the line of work he represents. In 1880 Mr. Latimer
entered the employ of the United States Electric Lighting Company
as a draftsman and private secretary to Sir Hiram S. Maxim, of
Maxim gun fame. In 1881 Mr. Latimer was sent to England by the
above-named company to establish the manufacture of the
incandescent electric lamps in the factory of the Maxim, Weston
Electric Light Company of London. He returned in the latter part of
1882, and continued only a few months in the employment of the
company who sent him abroad. For some time he served as
draftsman and electrician in several minor companies. He was
employed by the Edison Electric Light Company in 1886, and has
remained with them practically ever since, although that company
has been absorbed by the General Electric Lighting Company. Mr.
Latimer is kept in what is known as the legal expert department, and
is regarded as a very competent man in his profession. He stands
almost alone in his work as a colored man. I have only known of
about three members of the race who have made any effort along
that line, but the other two never succeeded in making any
headway, at least not enough to become known to any extent. Now,
one can easily see that the people who employ Mr. Latimer must
hold him in high esteem and place in him the most implicit
confidence, or they would never have sent him to another country to
represent their business. This mention of Mr. Latimer is another
evidence that colored people are gradually but surely getting into all
lines of business and professions, and I hope that in time we may
call attention to other successful electricians among the race.
MR. J. S. ATWOOD.
MR. J. S. ATWOOD.

Mr. J. S. Atwood, of Ripley, Ohio, is a member of the race who has a


great many friends and admirers among both white and colored
people. At present Mr. Atwood is engaged in the livery business on a
very large scale. His horses and carriages are the best, and his trade
comes from the leading people in the city. He not only owns the
large building where his business is carried on, but he owns quite a
number of others in the place. He was born a slave in Alabama, and
is a brother of Mr. W. Q. Atwood, of Saginaw, Mich., who is also
mentioned in this book. For years he has been active in the interest
of his race, especially in defending their rights. He was one who
urged Bishop Arnett to introduce the bill in the Ohio legislature that
mixed the schools of the State, and in that way gave several

You might also like