0% found this document useful (0 votes)
349 views46 pages

Functional Programming in Scala, Second Edition (MEAP V08) Michael Pilquist PDF Download

The document is about the second edition of 'Functional Programming in Scala,' which updates the original text to reflect changes in Scala and its ecosystem since 2014. It emphasizes teaching functional programming concepts without focusing on specific libraries, and includes inline answers to exercises to aid understanding. The book covers various topics such as functional data structures, error handling, and purely functional state, aiming to improve accessibility to functional programming.

Uploaded by

shlashdino
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
0% found this document useful (0 votes)
349 views46 pages

Functional Programming in Scala, Second Edition (MEAP V08) Michael Pilquist PDF Download

The document is about the second edition of 'Functional Programming in Scala,' which updates the original text to reflect changes in Scala and its ecosystem since 2014. It emphasizes teaching functional programming concepts without focusing on specific libraries, and includes inline answers to exercises to aid understanding. The book covers various topics such as functional data structures, error handling, and purely functional state, aiming to improve accessibility to functional programming.

Uploaded by

shlashdino
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/ 46

Functional Programming in Scala, Second Edition

(MEAP V08) Michael Pilquist pdf download

https://ebookmeta.com/product/functional-programming-in-scala-
second-edition-meap-v08-michael-pilquist/

Download more ebook from https://ebookmeta.com


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

Programming Scala Scalability Functional Programming


Objects Third Edition Wampler Dean

https://ebookmeta.com/product/programming-scala-scalability-
functional-programming-objects-third-edition-wampler-dean/

Learning Concurrent Programming in Scala Second Edition


Aleksandar Prokopec

https://ebookmeta.com/product/learning-concurrent-programming-in-
scala-second-edition-aleksandar-prokopec-2/

Learning Concurrent Programming in Scala Second Edition


Aleksandar Prokopec

https://ebookmeta.com/product/learning-concurrent-programming-in-
scala-second-edition-aleksandar-prokopec/

Below Zero (The STEMinist Novellas #3) 1st Edition Ali


Hazelwood

https://ebookmeta.com/product/below-zero-the-steminist-
novellas-3-1st-edition-ali-hazelwood/
Caged an Omegaverse Reverse Harem Romance Golden Cage
Omegas Book 1 1st Edition Mona Black

https://ebookmeta.com/product/caged-an-omegaverse-reverse-harem-
romance-golden-cage-omegas-book-1-1st-edition-mona-black/

The Lost Dragon Dan Michaelson D K Holmberg

https://ebookmeta.com/product/the-lost-dragon-dan-michaelson-d-k-
holmberg/

Blueprint How DNA Makes Us Who We Are with a new


afterword for the paperback edition Robert Plomin

https://ebookmeta.com/product/blueprint-how-dna-makes-us-who-we-
are-with-a-new-afterword-for-the-paperback-edition-robert-plomin/

Mathematical Methods in Image Processing and Inverse


Problems 1st Edition Xue-Cheng Tai

https://ebookmeta.com/product/mathematical-methods-in-image-
processing-and-inverse-problems-1st-edition-xue-cheng-tai/

We Are Not Broken 1st Edition Nadine Little

https://ebookmeta.com/product/we-are-not-broken-1st-edition-
nadine-little/
Atlas of Emergency Medicine Procedures 2nd Edition
Latha Ganti

https://ebookmeta.com/product/atlas-of-emergency-medicine-
procedures-2nd-edition-latha-ganti/
Functional Programming in Scala, Second Edition
MEAP V08
1. MEAP_VERSION_8
2. Welcome
3. 1_What_is_functional_programming?
4. 2_Getting_started_with_functional_programming_in_Scala
5. 3_Functional_data_structures
6. 4_Handling_errors_without_exceptions
7. 5_Strictness_and_laziness
8. 6_Purely_functional_state
9. 7_Purely_functional_parallelism
10. 8_Property-based_testing
11. 9_Parser_combinators
12. 10_Monoids
13. 11_Monads
14. 12_Applicative_and_traversable_functors
15. 13_External_effects_and_I/O
16. 14_Local_effects_and_mutable_state
17. 15_Stream_processing_and_incremental_I/O
MEAP VERSION 8
Welcome
Thank you for purchasing the MEAP for Functional Programming in Scala,
Second Edition.

The first edition was published in 2014 and quickly became regarded as a
classic text in functional programming. It's been used by university courses
and by study groups, by hobbyists and the by world's largest companies, and
has been translated to different languages. The first edition also had a
reputation for being very difficult, with many readers getting stuck on some
of the exercises.

A lot has changed in Scala since 2014. At the time of publication, Scala 2.10
had been recently released and the Scala FP ecosystem was in its infancy.
Major open source projects like Doobie (http://github.com/tpolecat/doobie)
and http4s (http://http4s.org) were just getting started, the Cats
(http://typelevel.org/cats/) library didn't yet exist, and FS2
(https://github.com/typelevel/fs2), which grew out of the code presented in
chapter 15, was just published. Interoperability between libraries was
cumbersome and the Scala language had some key limitations that made FP
less accessible than it could be.

The second edition of Functional Programming in Scala does not stray far
from the first edition. We cover the same topics and in the same style,
avoiding teaching any specific library and instead focusing on teaching the
underlying concepts that power libraries like Cats, Doobie, http4s, and FS2.
The text has been updated for the release of Scala 3, as well as other changes
that have occurred in the standard library since the original publication using
Scala 2.10. Perhaps controversially, we've decided to include inline,
annotated answers to the exercises. We hope that by doing so, readers that
were discouraged after getting stuck will instead find the inline answers
illuminating and continue with the text. We encourage all readers to try the
exercises before reading the answers though, as practice with FP concepts is
essential to understanding. The exercises and answers, updated for Scala 3,
are also available on the book's Github repository:
http://github.com/fpinscala/fpinscala on the second-edition branch.

We hope you enjoy the second edition of Functional Programming in Scala


and that it lives up to the reputation of the first edition. Finally, we need your
feedback, so please post questions or comments in the liveBook's Discussion
Forum. Doing so will help us make a better book, ultimately improving the
accessibility of functional programming.

— Michael Pilquist, Runar Bjarnason, & Paul Chiusano

In this book

MEAP VERSION 8 About this MEAP Welcome Brief Table of Contents 1


What is functional programming? 2 Getting started with functional
programming in Scala 3 Functional data structures 4 Handling errors without
exceptions 5 Strictness and laziness 6 Purely functional state 7 Purely
functional parallelism 8 Property-based testing 9 Parser combinators 10
Monoids 11 Monads 12 Applicative and traversable functors 13 External
effects and I/O 14 Local effects and mutable state 15 Stream processing and
incremental I/O
1 What is functional programming?
In this chapter
Understanding the benefits of functional programming
Defining pure functions
Referential transparency, purity, and the substitution model

Functional programming (FP) is based on a simple premise with far-reaching


implications: we construct our programs using only pure functions — in other
words, functions that have no side effects. What are side effects? A function
has a side effect if it does something other than simply return a result, for
example:

Modifying a variable
Modifying a data structure in place
Setting a field on an object
Throwing an exception or halting with an error
Printing to the console or reading user input
Reading from or writing to a file
Drawing on the screen

We’ll provide a more precise definition of side effects later in this chapter,
but consider what programming would be like without the ability to do these
things, or with significant restrictions on when and how these actions can
occur. It may be difficult to imagine. How is it even possible to write useful
programs at all? If we can’t reassign variables, how do we write simple
programs like loops? What about working with data that changes, or handling
errors without throwing exceptions? How can we write programs that must
perform I/O, like drawing to the screen or reading from a file?

The answer is that functional programming is a restriction on how we write


programs, but not on what programs we can express. Over the course of this
book, we’ll learn how to express all of our programs without side effects, and
that includes programs that perform I/O, handle errors, and modify data.
We’ll learn how following the discipline of FP is tremendously beneficial
because of the increase in modularity that we gain from programming with
pure functions. Because of their modularity and lack of side effects, pure
functions are easier to test, reuse, parallelize, generalize, and reason about.
Furthermore, pure functions are much less prone to bugs.

In this chapter, we’ll look at a simple program with side effects and
demonstrate some of the benefits of FP by removing these side effects. We’ll
also discuss the benefits of FP more generally and define two important
concepts—referential transparency and the substitution model.

1.1 Understanding the benefits of functional


programming
Let’s look at an example that demonstrates some of the benefits of
programming with pure functions. The point here is just to illustrate some
basic ideas that we’ll return to throughout this book. This will also be your
first exposure to Scala’s syntax. We’ll talk through Scala’s syntax much more
in the next chapter, so don’t worry too much about following every detail. As
long as you have a basic idea of what the code is doing, that’s what’s
important.

1.1.1 A program with side effects

Suppose we’re implementing a program to handle purchases at a coffee shop.


We’ll begin with a Scala 3[1] program that uses side effects in its
implementation (also called an impure program). Don’t worry too much
about Scala syntax at this point—we’ll take a closer look at that in the next
chapter.

Listing 1.1. A Scala program with side effects

class Cafe: #1
def buyCoffee(cc: CreditCard): Coffee = #2
val cup = Coffee() #3
cc.charge(cup.price) #4
cup #5
class CreditCard: #6
def charge(price: Double): Unit = #7
println("charging " + price) #8

class Coffee:
val price: Double = 2.0

val cc = CreditCard() #9
val cafe = Cafe()
val cup = cafe.buyCoffee(cc)

The line cc.charge(cup.price) is an example of a side effect. Charging a


credit card involves some interaction with the outside world—suppose it
requires contacting the credit card company via some web service,
authorizing the transaction, charging the card, and (if successful) persisting
some record of the transaction for later reference. But our function merely
returns a Coffee and these other actions are happening on the side, hence the
term “side effect.” (Again, we’ll define side effects more formally later in this
chapter.)

As a result of this side effect, the code is difficult to test. We don’t want our
tests to actually contact the credit card company and charge the card! This
lack of testability is suggesting a design change: arguably, CreditCard
shouldn’t have any knowledge baked into it about how to contact the credit
card company to actually execute a charge, nor should it have knowledge of
how to persist a record of this charge in our internal systems. We can make
the code more modular and testable by letting CreditCard be ignorant of
these concerns and passing a Payments object into buyCoffee.

Listing 1.2. Adding a payments object

class Cafe:
def buyCoffee(cc: CreditCard, p: Payments): Coffee =
val cup = Coffee()
p.charge(cc, cup.price)
cup

class CreditCard #1

trait Payments: #2
def charge(cc: CreditCard, price: Double): Unit #3
class SimulatedPayments extends Payments: #4
def charge(cc: CreditCard, price: Double): Unit =
println("charging " + price + " to " + cc)

class Coffee:
val price: Double = 2.0

val cc = CreditCard()
val p = Payments()
val cafe = Cafe()
val cup = cafe.buyCoffee(cc, p)

We’ve extracted the charging logic in to the Payments interface—in essence,


employing dependency injection. Though side effects still occur when we call
p.charge(cc, cup.price), we have at least regained some testability. We
can write a stub implementation of the Payments interface that is suitable for
testing. But that isn’t ideal either. We’re forced to make Payments an
interface, when a concrete class may have been fine otherwise, and any stub
implementation will be awkward to use. For example, it might contain some
internal state tracking the charges that have been made. We’ll have to inspect
that state after the call to buyCoffee, and our test will have to make sure this
state has been appropriately modified (mutated) by the call to charge. We
can use a mock framework or similar to handle this detail for us, but this all
feels like overkill if we just want to test that buyCoffee creates a charge equal
to the price of a cup of coffee.[3]

Separate from the concern of testing, there’s another problem: it’s difficult to
reuse buyCoffee. Suppose a customer, Alice, would like to order 12 cups of
coffee. Ideally we could just reuse buyCoffee for this, perhaps calling it 12
times in a loop. But as it is currently implemented, that will involve
contacting the payment system 12 times, authorizing 12 separate charges to
Alice’s credit card! That adds more processing fees and isn’t good for Alice
or the coffee shop.

What can we do about this? We could write a whole new function,


buyCoffees, with special logic for batching up the charges.[4] Here, that
might not be such a big deal, since the logic of buyCoffee is so simple, but in
other cases the logic we need to duplicate may be nontrivial, and we should
mourn the loss of code reuse and composition!
1.1.2 A functional solution: removing the side effects

The functional solution is to eliminate side effects and have buyCoffee return
the charge as a value in addition to returning the Coffee. The concerns of
processing the charge by sending it off to the credit card company, persisting
a record of it, and so on, will be handled elsewhere. Again, we’ll cover
Scala’s syntax more in later chapters, but here’s what a functional solution
might look like:
class Cafe:
def buyCoffee(cc: CreditCard): (Coffee, Charge) = #1
val cup = new Coffee()
(cup, Charge(cc, cup.price)) #2

Here we’ve separated the concern of creating a charge from the processing or
interpretation of that charge. The buyCoffee function now returns a Charge
as a value along with the Coffee. We’ll see shortly how this lets us reuse it
more easily to purchase multiple coffees with a single transaction. But what
is Charge? It’s a data type we just invented containing a CreditCard and an
amount, equipped with a handy function, combine, for combining charges
with the same CreditCard:
case class Charge(cc: CreditCard, amount: Double): #1
def combine(other: Charge): Charge =
if cc == other.cc then #2
Charge(cc, amount + other.amount) #3
else
throw new Exception("Can't combine charges with different cards") #4

Figure 1.1. A call to buy coffee.


Now let’s look at buyCoffees, to implement the purchase of n cups of coffee.
Unlike before, this can now be implemented in terms of buyCoffee, as we
had hoped. Note there’s a lot of new syntax and methods in this
implementation, which we’ll gradually become familiar with over the next
few chapters.

Listing 1.3. Buying multiple cups with buyCoffees

class Cafe:

def buyCoffee(cc: CreditCard): (Coffee, Charge) = ...

def buyCoffees(cc: CreditCard, n: Int): (List[Coffee], Charge) = #1


val purchases: List[(Coffee, Charge)] = List.fill(n)(buyCoffee(cc)) #2
val (coffees, charges) = purchases.unzip #3
(coffees, charges.reduce((c1, c2) => c1.combine(c2))) #4

Overall, this solution is a marked improvement—we’re now able to reuse


buyCoffee directly to define the buyCoffees function, and both functions are
trivially testable without having to define complicated stub implementations
of some Payments interface. In fact, the Cafe is now completely ignorant of
how the Charge values will be processed. We can still have a Payments class
for actually processing charges, of course, but Cafe doesn’t need to know
about it.

Making Charge into a first-class value has other benefits we might not have
anticipated: we can more easily assemble business logic for working with
these charges. For instance, Alice may bring her laptop to the coffee shop and
work there for a few hours, making occasional purchases. It might be nice if
the coffee shop could combine these purchases Alice makes into a single
charge, again saving on credit card processing fees. Since Charge is first-
class, we can write the following function to coalesce any same-card charges
in a List[Charge]:
def coalesce(charges: List[Charge]): List[Charge] =
charges.groupBy(_.cc).values.map(_.reduce(_.combine(_))).toList

We’re passing functions as values to the groupBy, map, and reduce methods.
You’ll learn to read and write one-liners like this over the next several
chapters. The _.cc and _.combine(_) are syntax for anonymous functions,
which we’ll introduce in the next chapter. As a preview, _.cc is equivalent to
c => c.cc and _.combine(_) is equivalent to (c1, c2) =>
c1.combine(c2).

You may find this kind of code difficult to read because the notation is very
compact. But as you work through this book, reading and writing Scala code
like this will become second nature to you very quickly. This function takes a
list of charges, groups them by the credit card used, and then combines them
into a single charge per card. It’s perfectly reusable and testable without any
additional mock objects or interfaces. Imagine trying to implement the same
logic with our first implementation of buyCoffee!

This is just a taste of why functional programming has the benefits claimed,
and this example is intentionally simple. If the series of refactorings used
here seems natural, obvious, unremarkable, or standard practice, that’s good.
FP is merely a discipline that takes what many consider a good idea to its
logical endpoint, applying the discipline even in situations where its
applicability is less obvious. As you’ll learn over the course of this book, the
consequences of consistently following the discipline of FP are profound and
the benefits enormous. FP is a truly radical shift in how programs are
organized at every level—from the simplest of loops to high-level program
architecture. The style that emerges is quite different, but it’s a beautiful and
cohesive approach to programming that we hope you come to appreciate.

What about the real world?

We saw in the case of buyCoffee how we could separate the creation of the
Charge from the interpretation or processing of that Charge. In general, we’ll
learn how this sort of transformation can be applied to any function with side
effects to push these effects to the outer layers of the program. Functional
programmers often speak of implementing programs with a pure core
and a thin layer on the outside that handles effects.

But even so, surely at some point we must actually have an effect on the
world and submit the Charge for processing by some external system. And
aren’t there other useful programs that necessitate side effects or mutation?
How do we write such programs? As we work through this book, we’ll
Another Random Scribd Document
with Unrelated Content
between the palms of their hands, wound the pieces round sticks in
a spiral fashion, and baked them in front of the fire. A few potatoes
the Maoris had with them were likewise spitted and roasted in this
way. The place where we camped was an exceedingly wild-looking
spot, and during the night we experienced a severe frost, the
thermometer descending to 28°.
We struck our camp at the Mangakino before daylight, and set out
on our journey at once, but, unpleasant to relate, without any
breakfast, as our commissariat was now reduced to a few potatoes,
which we had determined to cook when we should get further on
the road. We rose from the valley of the river on to the level plains
just as the first rays of the sun swept over the country in a flood of
glowing light, and the air was so pure and buoyant that we soon
forgot that we were journeying on an empty stomach, until we came
to a stream, where we found an abundant growth of watercress, of
which we ate heartily, one of the Maoris remarking with a broad grin
that we had at last come "to feed like the cows." When travelling
with the Maoris I could not but admire the easy, good-natured way
in which they took everything—nothing disconcerted them. When
impediments to travel presented themselves, the bigger the
difficulties to overcome, the more ardent they appeared to surmount
them. When crossing the swollen rivers, if one got a bigger ducking
than the rest, they would laugh and joke at the ill-luck of their
comrade, while he in his turn would enjoy the amusement as much
as they did.
On one occasion, when we were ascending a steep, slippery hill, the
saddle-girth of one of the horses broke, and the saddle slipping
aside, the rider fell heavily and rolled down a muddy bank. This
brought down roars of laughter from the others, who told him not to
mind himself, but that it was a pity to spoil a good horse by letting
him know how easily a man could fall off his back.
I always found the natives to be expert and fearless horsemen, and
I believe that a cavalry regiment of well-trained and well-mounted
Maoris, both for courage, endurance, and élan, would form one of
the finest body of troops ever marshalled upon a parade-ground or a
battle-field.
When travelling with them, another interesting fact was that they
seemed to take a pride in being able to define thoroughly all the
natural features of their country. Each mountain and hill had its
special name, and every valley and plain and river, down to the
smallest stream, each being called after some characteristic feature
or legendary tale connected with it; while every tree, plant, bird, and
insect was known by a designation which betokened either its
appearance or habits.
A remarkable feature indicative of the endurance of the natives, was
that one night they would be sleeping in a wharepuni with the
thermometer over 100°, and the next night they would not hesitate
to lie down upon the damp ground with only a blanket over them,
and with the thermometer at several degrees below freezing-point.
It is true we often went through the same ordeal ourselves during
the journey, but it appeared to me to be more remarkable on the
part of the Maoris, as they seemed to enjoy the stifling heat of their
wharepunis as a positive luxury, while we looked upon it as being
very much akin to a sojourn in Hades.
We reached the Waipapa River near its junction with the Mangatete,
and descended from the table-land, over 100 feet, to the crossing-
place. This river, which was one of the largest we had met with,
rushed with a rapid current through a deep rock-bound gorge from
the mountains of Titiraupenga to join the Waikato, of which it
formed one of the principal tributaries. We gained the crossing-place
by a steep, winding descent, the mountains with their rocky bluffs
on the opposite side of the river being clothed with a dense
vegetation of giant trees, while to the right of the track by which we
had to descend was a small mountain forming a complete cone, and
which was clothed from base to summit with a luxuriant growth of
fern and tall manuka. The whole gorge through which the river
wound had a very wild and beautiful appearance, while the water,
like that of the Waikato, into which it fell after crossing the plains,
was as clear as crystal. Beyond the Waipapa we passed through
more open country until we neared the Te Toto ranges, when
mountain, hill, and valley mingled together in a most picturesque
way.
It took us several hours to traverse the Te Toto ranges, the track
winding about in every direction, with deep ravines on either side.
Here the vegetation was of the most luxuriant and varied order, but
the enormous roots of the great trees made riding very difficult.
We crossed the Waipari River, a large stream flowing from the
Rangitoto ranges into the Waikato. The descent to the crossing-place
of this river was no less than 500 feet, and we had to mount a
slippery incline on the opposite side of equal altitude. Our course
now lay over high fern-clad ridges, and now, for the first time, the
broad valley of the Waipa was before us, with Maungatautari to the
north, and Pirongia to the north-west.
Towards sundown we passed along a ridge, with a tremendous rock-
bound gorge beneath us, and where the enormous rocks were
dispersed about in a way which resembled the ruins of a feudal
stronghold. This place was formerly occupied as a pa, and on one
occasion a great battle was fought there by the Ngatiraukawa, who
were defeated by the Ngatituwharetoa and Ngatimatakore, who, it is
said, feasted for days on the bodies of their enemies.
A few miles beyond Tetauranga we arrived at a low hill, upon the
summit of which a number of Maoris were camped in tents. As luck
would have it, feeding was just going on, and we were invited to
partake of a welcome meal. Although it was now evening, we
determined to push on our way, and when the moon rose we
started, and gained the head-waters of the Puniu River, which we
crossed with the intention of camping on the opposite side; we,
however, got wet in the operation, and as the place was swampy,
and the night fearfully cold, we determined to ride several miles
further, to Hengia pa, which we reached at ten o'clock, after a
journey of over sixty miles, and which had kept us in the saddle for
about seventeen hours. Before arrival at the settlement, the whole
country was covered with a white frost, and the damp, chilly cold of
the low valley of the Waipa seemed to go right into the marrow of
one's bones.
The natives appeared much surprised at our nocturnal raid upon
them, but we were soon invited into a whare, where a big fire was
burning, and where four men and an old woman were located with
three or four mongrel dogs. One of the men, although apparently
very old, was yet wiry and active, while his pinched, sharp features
were tattooed in the most elaborate way up to the very roots of his
hair, the thin blue lines forming a complete network over his
countenance. This was the most artistically tattooed savage we had
met on the journey, and Turner remarked to me that he would much
like to have the old man's head to preserve as a mokaikai,[72] but he
was cautious enough not to express this desire to the antiquated
Hauhau.
After we had talked over matters for some time, and the surprise
occasioned by our visit had somewhat abated, our tattooed friend
produced a newly-slaughtered pig from a dark corner of the whare,
and when this was dismembered and some potatoes had been
peeled by the old woman, there was soon a good meal cooking for
our benefit. After we had partaken of our repast, we were invited by
our entertainers to remain the night, and being only too glad to take
advantage of their proffered hospitality, we took up our quarters in a
corner of the primitive whare, which, unpleasant to relate, was
literally alive with fleas.

FOOTNOTES:
[70] For wingless birds, see Appendix.
[71] There were no less than six species of this extinct wingless
bird—
The 11
Giganteus, height
Dinornis feet.
8
" Robustus, " feet
6 in.
6
" Elephantopus " feet
8 in.
5
" Casuarinus " feet
6 in.
5
" Crassus "
feet.
4
" Didiformus " feet
8 in.
[72] Mokaikai, a process of embalming heads, by saturating them
with the pyroligneous acid of wood. This custom was at one time
very common with the Maoris, who thus preserved the heads of
their ancestors, the skin and tattoo marks of the face remaining
perfect for many years.
CHAPTER XXVIII.
THE AUKATI LINE.

Manga-o-rongo—Mangatutu River—The encampment—A


sumptuous repast—The kainga—Surrounding scenery—Old
warriors—The tribes—The Korero—Arrival of Te Kooti—His
wife—His followers—A tête-à-tête—A song of welcome—A
haka—Departure from Manga-o-rongo—Waipa River—Valley
of the Waipa—Our last difficulty.

THE nearest way for us to have reached civilization from Hengia


would have been to travel straight to Kihikihi; but there was great
talk of a native meeting to be held at Manga-o-rongo, a settlement
situated at some distance further south from where we were, and as
it was stated that Te Kooti and a large number of natives from all
parts would be there, I determined to attend the korero, as much as
anything to see the ex-rebel chief of whom I had heard so much,
and afterwards pass to Alexandra by way of the valley of the Waipa.
We left Hengia at daybreak with a party of natives, who were going
in the same direction as ourselves, and took a southerly course
through a district known as Wharepapa, and which led us in the
direction of the Rangitoto Mountains. As we approached the valley of
the Mangatutu River, the country became more undulating, until we
gained the bed of the stream, which wound in a remarkably
serpentine course from the Rangitoto Mountains. In the bed of the
river the natives pointed out several curious kinds of stone, in form
not unlike the blade of an axe, and which were formerly sharpened
and used as tomahawks by the tribes of the district. The country
hereabouts fell rapidly from 500 to 300 feet, and gradually became
of a lesser altitude as we went on. Crossing the river, we continued
our course through the open, fern-clad plains known to the natives
as Manutarere, passing on our right a rock which rose like a rude
monument from the centre of a circular basin of low hills.
Beyond this point we passed through a native kainga, known as
Patokatoka, and soon afterwards reached Manga-o-rongo. A large
encampment of natives was already formed, and great preparations
were being made for the gathering; pigs were being slaughtered by
the dozen, bevies of women and girls were busy at work with
delicacies intended for the feast, while mounted natives were riding
to and fro in every direction.
We rode into the kainga with the natives who had accompanied us
from Hengia, and were received with loud shouts of haeremai from
the women, who danced about and circled their arms in the air in
the wildest way.
When the hongi had been performed, and a tangi had been held—
for they wept here as they had done at Pouotepiki—we were invited
to sit down in a circle with the natives who had accompanied us, and
soon afterwards a number of women and girls, who came tripping
along in Indian file, singing a wild refrain, brought us pork and
potatoes and bread and kumaras, in plaited flax baskets, each hapu
present contributing according to custom, a certain quantity, so that
in a short time we had food enough around us to last us for a
month. We ate heartily of the good things placed before us, but we
had great fights over our banquet with the half-starved dogs
assembled from all parts of the country, and which became so
audacious in their efforts to obtain our luxuries, that we had to keep
our whips going right and left all the time.
NATIVE GIRL.
We remained at Manga-o-rongo for three days, during which time
we had a good opportunity of examining the settlement and the
general features of the surrounding country. The kainga, composed
for the most part of a number of scattered whares separated by
broad patches of cultivation, was situated in a deep, basin-like
depression in the upper valley of the Waipa, and upon the banks of
a small river called the Manga-o-rongo, one of the principal
tributaries of the Waipa. The scenery of the adjacent country was
very attractive, the Rangitoto Mountains forming a beautiful and
conspicuous feature to the south.
The Rangitoto Mountains, the highest points of which attained to an
altitude of about 2500 feet, were clothed to their summits with a
dense vegetation, and flanked with lower hills covered with a
luxuriant growth of fern, while winding valleys and deep ravines
stretched far into the rugged fastnesses beyond. To the westward of
the Rangitoto ranges were the mountains of the Kuiti, where the
deep green forests were interspersed with wide stretches of open
fern, which swept down to the undulating hills at their base. On all
other sides the country around Manga-o-rongo was open, and
presented a series of broad, rolling plains, covered with low fern,
and where the dark alluvial soil was of the richest description.
We were given quarters in one of the principal wharepunis in the
centre of the kainga, which was dotted around with whares, tents,
and other contrivances for the accommodation of the various hapus
attending the korero. In a large whare close to our location were
about a dozen or so of old men, who had formed a kind of
headquarters of their own. They were all true-bred Maoris of the old
school, of Herculean build, and they appeared to be from eighty to
ninety years of age, and it occurred to me that one or two among
them could have counted their moons[73] even further back than
that; and as they sat squatting about in the sun, with their blankets
wrapped round them, their weazened, tattooed features looked
remarkably grim, surmounted, as they were in every case, by a thick
growth of snow-white hair. Each one of them wore a piece of
greenstone in his left ear, and all had wooden pipes, which they
puffed at incessantly. It was remarkable to observe the difference in
physique between these old warriors—for they had all been great
fighting men during the war—and the younger natives. Although
there were many stalwart and powerful fellows among the latter, in
general they had not the same square build and muscular frames of
the old men, who appeared to be perfect and well-conserved types
of the primitive Maori race.
There were many representatives of the principal tribes of the
surrounding country in camp, and especially of the Waikatos and
Ngatimaniapotos; but, besides these, there were sections of the
Ngatiwhakatere, Ngatiraukawa, Ngatituwharetoa, Ngatihaua, and
Ngatiawa. All these various tribal divisions were represented by the
principal chiefs and notables, both men and women, and, when
assembled together, it was easy to trace their different physical
characteristics. There were many tall and powerfully-built men
among the Waikatos and Ngatimaniapotos, but the women of the
two latter tribes were not as sturdy in frame, nor as robust in
appearance as those of the Ngatituwharetoa tribe of Taupo. In fact,
the natives of the latter district were, all things considered, the finest
tribes we had come across during our journey, the chiefs, especially
of this division of the Arawas, being remarkable for their tall stature.
WOMAN OF THE WAIKATO TRIBE.
The principal business of the meeting, which had brought the tribes
together, was to consider a petition of the Ngatimaniapoto to
Government, respecting the lands, and in which the chief Taonui,
with Wahanui, had taken a leading part. Another important question
was the settlement of certain tribal boundaries, and the
consideration of the claim of the Ngatihaua, to a large tract of
country near to the Rangitoto Mountains, and which they claimed to
have acquired by conquest over the Ngatiwhakatere, a hapu of the
Ngatiraukawa. At this meeting the kaingatautohe, or debateable
land, was formally surrendered to the Ngatiwhakateres, the
originally conquered tribe, by the chief Hauauru, who claimed to be
the direct descendant of the warriors who conquered the
Ngatiwhakateres, when the territory in dispute was acquired.
On the second day after our arrival at Manga-o-rongo, there was
great excitement in camp as a body of about fifty horsemen, headed
by a woman, were seen galloping as hard as they could come across
the plain leading to the settlement. There were loud cries of
haeremai from the women, and shouts of Te Kooti from the men as
the ex-rebel chief and his wife rode into camp at the head of a band
of well-mounted though wild-looking horsemen.
TE KOOTI.
(From a Sketch by the Author.)
When the new arrivals had pitched the tents they had brought with
them, and were squatting in a circle round the hero of Poverty Bay, I
went into the camp, when Te Kooti saluted me with "Tena koe,
pakeha," and invited me to be seated. I took in his outward
appearance at a glance. He was a man apparently of about fifty
years of age, over medium height, of athletic form, broad
shouldered and keenly knit, and with a remarkably stern expression
of countenance, which imparted to his whole visage a hard and even
a cruel look. His features, cast in the true native mould, were
strongly defined. His head was well formed, with a high arched
forehead, and his lips were well cut and firm, while his quick, dark,
piercing eyes had a restless glance about them as if their owner had
been kept all his life in a chronic state of nervous excitement. He
wore a moustache and long pointed beard, which, for the apparent
age of the man, appeared to be prematurely grey. There were no
tattoo marks about his face, but when he smiled in his sinister way
every line of his expressive features seemed to be brought into play.
Taken altogether, Te Kooti had a decidedly intelligent cast of
countenance, in which the traits of firmness and determination
appeared to be strongly marked.
TE KOOTI'S WIFE.
His wife, who was apparently a few years younger than himself, was
a strongly built, gaunt woman, with a remarkably bold expression of
countenance, and I could well imagine that during the troubled
times of the war she must have proved a daring and willing
helpmate to her desperate lord.
The followers of Te Kooti, who sat around, were mostly men of over
six feet in height, powerful in build, and stern and savage-looking in
countenance, and with the same air of watchfulness about them as
was observable in the manner of Te Kooti, as if they, like their chief,
had been ever on the qui-vive for their lives during their long sojourn
of outlawry in the fastnesses of the King Country.
The first question put to me by Te Kooti was to inquire where I had
come from, and when Turner explained to him the course of our
journey he replied, "They told me as soon as I arrived that a pakeha
was in camp, and that he had travelled through the country; and I
said, now that he has been through and seen all, let him remain. I
did many a long journey," he continued, "during the war, but I never
did a ride like that on one horse. I was always careful to have plenty
of horses." I told him that I had seen the remains of his pa at Te
Perore, near Tongariro, where one of his great battles was fought;
and taking his left arm out of a sling, he said, "This is what the
pakehas gave me there," and he showed me how a rifle-ball had
struck him between the knuckle joints of the two first fingers,
crippling them both. Ever since he was wounded in this way, he has
always made it a rule to hide this hand as much as possible, and for
that purpose he carries it constantly in a sling. He asked me whether
I came from England, and when answered in the affirmative, he put
many questions to me about the country, and was especially anxious
to know whether the Queen was still alive, as he stated that he had
often heard of her when at war with the Europeans. He then said
that the Maoris did not want that war, but the pakehas would fight,
and the Maoris fought them. I remarked that it was now time for the
two races to be as one, and that all the troubles of the past should
be forgotten, and that the King Country should be opened by roads
and railways. "I do not object," said Te Kooti, "to roads and railways;
but," he continued, "we must hold the lands; it will not do for the
natives to lose everything." I pointed out that in India a handful of
pakehas ruled over 200,000,000 of people, and that roads and
railways had been made in that country, and the natives had
benefitted. Te Kooti, without a moment's hesitation, replied, "In
India the pakeha rules justly; here the governments have not
treated the Maoris fairly: one government has promised one thing
and one another, and they have all broken faith."
When I stated to him that since the formation of the colony one law
and one sovereign reigned from one end of New Zealand to the
other, and that that applied to the King Country as well as to any
other part of the island, he replied, "That may be so. But," he
continued, "you have your queen, and Tawhiao is our king. Whatever
Tawhiao says, we must do."
At this stage Te Kooti burst forth with a wild chant—a kind of song of
welcome, which was intended as a compliment to our visit. As Te
Kooti sang, his voice was singularly clear and mournful, and his
intonation very distinct, while every word, as it fell from his lips,
appeared to be uttered with the wild impulse of a fanatic. During
this time his followers, as they had in fact done all along, sat
listening in mute attention, as if anxious to hear the words of one
whom they appeared to look upon as a kind of deified man, or as
one endowed with a charmed life that had made him the hero of
brave and extraordinary exploits, which recalled to mind some of the
most daring and bloody deeds of Maori warfare, and as I listened to
his wild refrain, and marked the earnest yet animated expression of
his features as he sang, I could well realize the influence which such
a man would exercise over the superstitious minds of the Maoris,
and yet when I recalled to mind his remarkable career, his
marvellous escape from the Chatham Islands with his devoted band,
his desperate and bloody raid upon the settlers of Poverty Bay, and
the series of daring achievements which rendered the name of Te
Kooti a terror and a menace during the war that followed, I could
not but help thinking that many of the Cæsars and Napoleons of
history must have been made of much the same stuff as this
fanatical Hauhau leader.
Our last night in the King Country was celebrated by a haka in Te
Kooti's camp. Never had I seen anything so wild or so exciting.
When the moon was up we went to a secluded spot surrounded by
forest, where huge fires had been lit to assist the doubtful light of
the Queen of night. The spectators squatted about in a semicircle,
the ex-rebel chief taking up his position in the midst of his swarthy
followers. At a signal given about fifty men entered the arena and
nearly as many women. All were lightly clad; so lightly indeed that
the costume of our first parents had not been greatly encroached
upon. At a signal given from the leader the dancers formed
themselves into ranks, and the first step was made by striking the
feet heavily upon the ground, and, as the excitement produced by
this movement gradually increased, the limbs trembled from the feet
upwards, until every muscle in the body appeared to shake and
twist, as if from the thrilling effects of a galvanic current. Then they
turned their bodies to the right with a swinging jump, keeping the
elbows close to the ribs and stretching out the fore-part of the arm
until the hands and fingers shook and trembled as if strung together
by wires. Then, they swung the body to the left in the same attitude,
and then, facing to the front, threw back their heads, thrust out their
tongues to the fullest extent in a menacing way, and turned up their
eyes until nothing but the whites could be seen, and which,
gleaming beneath the bright glow of the fires, imparted to their
distorted countenances a singularly ghastly look. Next a wiry,
tattooed savage jumped to the front with a loud yell, thrusting out
his tongue, and distorting his features until the blue lines formed a
quivering network over his face. He challenged the best dancer in
the throng, at which a woman appeared upon the scene, when the
pair performed a dance which no pen or pencil could describe. Then
they returned into the ranks, and another couple followed, and then
a third, and a fourth, until the whole crowd mingling together
danced and yelled in a marvellous yet diabolical way. The dark,
streaming hair of the women fell over their well-turned shoulders or
swept round their heads in a circle, as the dark syrens went through
the most extraordinary gyrations, with the rapidity of electrified
humming-tops, while the men, twirling their weapons furiously in the
air, yelled in a loud chorus which terminated in a long, deep,
expressive sigh. Again and again these movements were enacted
with protruding tongues, distorted faces, and fixed, staring eyes,
time being marked by striking the thigh with the open left hand, so
as to produce a sound which, mingling with the loud shouting of the
furious dancers, added a curious effect to the wild and boisterous
scene.
It was a bright morning when we left Manga-o-rongo to do the last
stage of our eventful journey. Although our horses had rested for
two days, it was clear that they were utterly exhausted from their
past fatigues, while their legs were so swollen that we could hardly
get them to move along. Leaving the settlement, the whole broad
valley of the Waipa lay stretched before us in the form of a wide
expanse of open plain, through which the winding river, from which
it derives its name, meandered in the direction of the north.
The Waipa has its source on the southern side of Mount Pukeokahu,
which is situated a little to the eastward of Mount Rangitoto. It
winds round the western end of the Rangitoto ranges, and finally
pursues its way along the Waipa Valley. Besides receiving, however,
a large portion of the watershed of the Rangitoto Mountains, most of
the streams from the ranges of the Kuiti flow into it, while to the
west it is fed by numerous watercourses from the high coast ranges.
Its principal tributaries are the Mangapu, Manga-o-Rewa, and
Mangawhero, with the Puniu as the chief. Beyond the head of the
river the watershed falls towards the Mokau, south of which the
country is open for a considerable distance in the direction of the
Tetaraka Plains, until the great central belt of forest country is
reached.
The whole wide valley of the Waipa lies very low, its altitude near
the margin of the stream being scarcely 100 feet above the level of
the sea; but the country rises gradually towards the west into
undulating fern-clad hills, which mount in a kind of terrace
formation, one above the other, until they reach the high wooded
ranges which border the West Coast. The plains of this valley are
composed for the most part of rich alluvial soil, which is everywhere
covered with a dense growth of low fern. Many native cultivations
and settlements are dotted about along the whole course of the
river, and, taken altogether, this valley is one of the most densely
populated portions of the King Country. From every point of view the
scenery is most attractive, especially when looking in the direction of
the north, where the tall forms of Pirongia, Maungatautari, and
Kakepuku tower high above the surrounding plains.
It was already night when we had nearly reached the end of our
journey, and just as we drew rein at a native whare to inquire the
best point at which to cross the Waipa, my horse sank under me
from sheer exhaustion as I sat on his back. A little coaxing got
"Charlie" on to his legs again, and we hastened down to the banks
of the Waipa to find that the river was almost at high flood. There
was a canoe at the ford, but, as ill-luck would have it, it happened to
be on the opposite side of the stream. We shouted lustily, in the
hope that some one would hear us, and come and ferry us across,
but there was no response but the echo of our voices, and it seemed
that we would have to pass another night in the open, or swim our
horses at the risk of our lives. The night was bitterly cold, and we
were naturally anxious to reach our long looked-for goal, and, just as
we were making preparations to swim the river, voices were heard
on the other side, and in a few moments more the canoe shot across
the water under the skilful guidance of three young Maori girls. It did
not take us long to unsaddle, and, putting everything into the canoe
with ourselves, we swam our exhausted animals across, but not
before "Tommy," by being swept under the frail craft, by the force of
the current, had nearly succeeded in upsetting it in the centre of the
rapid stream. Once on the opposite side, we pressed upon our dark
deliverers all the money we could muster, and, entering the King's
settlement at Whatiwhatihoe, we crossed the aukati line forming the
northern boundary of the King Country, when the moon was high,
on the night of the 18th of May, after a journey, which, taking all
distances traversed into account, was not short of 600 miles.
FOOTNOTES:
[73] The Maoris count time by nights, moons, and stars. There
appears to have been a kind of division of the nights into decades,
as ten nights to the full moon, ten to its disappearing. The Maori
year begins with the first new moon after the star Puanga is seen
in the morning, which is in May.
APPENDIX.

POTATAU II.
THE ancestry and tribal connections of Matutaera Te Pukepuke Te
Paue Tu Karato Te-a-Potatau Te Wherowhero Tawhiao, or Potatau II.,
render him the most illustrious and influential chief in New Zealand.
No Maori chief is truly great unless he can trace his descent to some
of those who came in the first canoes from Hawaiki. Tawhiao can do
this, his ancestor being Hotonui, who came in the canoe Tainui, which
made the land at Kawhia. The ancestor, however, who makes the
greatest figure in the history of the family is Tapaue, who had a
number of children who did well in the world, and founded quite a
number of tribes who exist to this day. These children were—Te
Rorokitua, who was the ancestor of the Ngatipaoa, Te Putu, Tahau, Te
Apa, Huiarangi, Ratua, Hikaurua. The son of Te Putu was Tawhia,
whose son was Tuata, whose son was Te Rauanganga, whose son was
Te Wherowhero, whose son was the present Tawhiao. The name of
Tawhiao's mother was Whakaawi, a woman of high birth of the
Ngatimahutu tribe.
Tawhiao's autobiographical narrative is as follows:—
"I was born at a place called Orongokoekoea, at Mokau. The whole of
the Waikatos had been driven from Waikato by the invasion of Hongi,
with his muskets, and the tribes had suffered greatly when the pa was
taken at Matakitaki. The whole of the Waikatos were living at Mokau
when I was born, from fear of Pomare. [The fall of Matakitaki took
place in 1823, and Tawhiao would probably be born a year or two
later.] We did not remain long at Mokau after the death of Pomare. We
came back to Haurua, Kopua, and other places. I lived at Honipaka, in
the Waipa. The Ngatitipa were at Haurau. Te Rauparaha had gone
south long before that time, in prosecution of his conquests at Cook's
Straits. Some of Rauparaha's people, however, the Ngatitoa and
Ngatikoata, came to Matakitaki, and were slain there. Te Waharoa was
then living at Horotiu, and did not move. The Ngapuhi did not attack
him. Pomare made peace with Takurua. Waikato heard that peace had
been made. At this time Te Wherowhero had gone to Taupo. Rauroha
said to Pomare, 'Go back to your own country,' but Pomare would not
consent. Rauroha said, 'You have made peace with me; look at
Matire.' [Matire Toha was subsequently married to Kati, Te
Wherowhero's brother, on the peace-making between Waikato and
Ngapuhi.] Te Wherowhero wished to go to Pomare, but Te Kanawa
resisted his desire, thinking there would be treachery. Pomare insisted
upon going up to Waikato. He was met in battle by the Ngatitipa, the
Ngatitamaoho. Te Aho, a son of Kukutai shot Pomare's fingers off, and
when his people discovered that Pomare was wounded, they fled. The
fight took place at Te Rore, on the Waipa, and the Ngapuhi fled to
Whaingaroa. The chase continued to Te Akau, and as far as Awhitu. I
remember when Matire Toha was brought to Waikato to be married to
Kati. I remember the great crowds that were assembled at the time.
Te Kihirini brought Matire to Waikato. She was very young then. The
first Europeans we saw were at Kawhia. The first I remember was
Captain Kent. The first missionaries in Waikato were Stack, Hamlin,
Williams, and Morgan. The missionaries told us that we should be
burned up unless we believed. I myself was baptized by the name
Matutaera, at Mangere, by Mr. Burrows.
"I remember a European coming to ask Te Wherowhero to sign the
treaty of Waitangi. That European was the missionary, Mr. Maunsell.
[The Ven. Archdeacon Maunsell.] The Maori he had with him was
Tipene Tahatika. Te Wherowhero said he would not sign. Mr. Maunsell
remarked to Tipene, 'This ignorant old man, if he had signed, I would
have given him a blanket.' Te Wherowhero was then at Awhitu. Te
Wherowhero's name was afterwards put to the treaty, but it was
written by Te Kahawai, not by himself. I was at the great meeting at
Remuera. That was when Fitzroy was Governor. The principal speakers
were Wetere te Kauae and Te Katipa. Governor Fitzroy visited Kawhia.
The Rev. Mr. Whiteley and the missionaries had been there long
before that time. When Sir George Grey came, he visited Rangiawhia,
Te Awamutu, and other settlements in Waikato. He had thirty Maoris
as his following. Sir George Grey pointed out Mangere as a place for
Te Wherowhero. He said to my father, 'Come to Mangere, the land is
for you.' I never attended any of the Mission schools."
In reference to the beginning of the New Zealand war, after Te
Wherowhero's death, and when Tawhiao had succeeded his father as
king, he narrates:—
"I was at Rawhitu, a few miles above Rangiriri, when I heard that the
soldiers had crossed the Mangatawhiri. Heta Tarawhiti and a few
others were with me. The Waikatos were then at Rangiriri and other
places. I warned them to avoid the soldiers. When I heard that the
soldiers had crossed the Mangatawhiri, I warned the Maoris to avoid
the soldiers. I told them they should not meet the soldiers on the line
of the Waikato river, but should go inland by Whangamarino to
Paparata, and then to the Kirikiri. [Apparently this was Tawhiao's
military plan, instead of constructing pas on the river, like Meremere
and Rangiriri. If his advice had been taken, the line of our advance,
would have been threatened, and the settlements around Auckland
placed in great danger.] The next thing I heard was that a battle had
been fought at the Koheroa, and that the people I had sent to evade
the soldiers had also gone and fought at the Koheroa. Tapihana was
the chief man whom I had charged. I sent a message also to Mohi
and Ihaaka (occupying the settlement at Pukekohe, the Kirikiri and
adjacent places), telling them to come out from their villages. The
engineer of the pa at Rangiriri, who directed its formation, was Te
Wharepu. I told the people that they should retire to the depth of the
forest to evade the troops. The others would not consent. Te Wharepu
was the leader of the others. They said, 'We will not agree; if our
blood must be shed, let it be shed on our own land at Waikato.' I was
at the fight at Rangiriri. Wiremu Tamehana and myself went to
Rangiriri, and requested the people to move away from that place.
That was the object of both Thompson[74] and myself in going. A
dozen times I tried to persuade them to break up from Rangiriri, but
finding that our efforts were unsuccessful, we left. The balls were
then flying in all directions. I took refuge behind a flax bush. A bullet
passed close to me, and struck the bush. I was not injured. I had a
gun and cartridge-box. I saw some of my people escaping. I told them
to be swift, and move on. They said, 'You must look after yourself; are
you not in danger?' I said, 'No, I will rest a while here.' I took off my
coat and vest, and, after a while, I succeeded in getting on board a
canoe belonging to the Ngatitamaoho, and in making my escape.
Previously ten guns were levelled at me, and a big gun also.
Messengers had gone before, and told the people that I was safe."

FOOTNOTES:
[74] A native known as The King Maker.
THE CHIEFS.
Wiremu Te Wheoro Te Morehu Maipapa comes from a distinguished line
of ancestors. From a woman of celebrity, named Hourua, after whom
the tribe was called, and whose worthy chief was that famous man
Wiremu Te Awatora, of Raglan. Then from the renowned ancestor
Tapoue, Te Wheoro becomes a near relative of Tawhiao, the present
Maori King, which circumstance accounts for the fact of his taking
possession of the Tiwai canoe, which conveyed the late Maori King,
Potatau Te Wherowhero, from Manukau to Ngaruawahia.
The father and mother of Te Wheoro resided in the earlier times at
their settlement, Kaniwhaniwha, on the Waipa River, but, as was the
custom, they would remove to other places, being interested in other
lands, thus verifying the old Maori proverb, "Ka mete kainga tahi; ka
ora kaingarua" (he that has but one home will be subject to failure; he
that has two homes will prosper). The name of Te Wheoro's father
was Te Kaingamata, and his mother's name was Ngapaoa of the
Ngatihinetu tribe of Rangiaowhia. Te Wheoro's grandfather was Te
Whakaete, who was acknowledged to have been of great power
among the Waikatos. Te Whakaete was killed at Maungatautari by the
Ngatipukenga, a war party on its way to Te Wairoa, east coast, and
headed by the chief Naunau. Te Wheoro's own settlement was at Te
Kohekohe, Lower Waikato, and he was always a faithful adherent of
the Europeans. His valuable services were brought into requisition by
General Cameron when war was declared against the Waikatos. The
calamities which befell his people arising out of the war must have
greatly afflicted him, for he tried very hard to divert war during the
Civil Commissionership of Mr. Gorst, M.P., in the Waikato, when Sir
George Grey's Runanga system was introduced, and when the two
Maori newspapers—the Government organ, Te Pihoihoi, and the Maori
King organ, Te Hokioi—were waging a hostile war, which unhappily
culminated in a breach of the peace, Manga Maniapoto having
instructed his partisans to seize the press and type, which was duly

You might also like