13730444
13730444
https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374
https://ebooknice.com/product/matematik-5000-kurs-2c-larobok-23848312
https://ebooknice.com/product/sat-ii-success-
math-1c-and-2c-2002-peterson-s-sat-ii-success-1722018
(Ebook) Master SAT II Math 1c and 2c 4th ed (Arco Master the SAT
Subject Test: Math Levels 1 & 2) by Arco ISBN 9780768923049,
0768923042
https://ebooknice.com/product/master-sat-ii-math-1c-and-2c-4th-ed-
arco-master-the-sat-subject-test-math-levels-1-2-2326094
(Ebook) Cambridge IGCSE and O Level History Workbook 2C - Depth Study:
the United States, 1919-41 2nd Edition by Benjamin Harrison ISBN
9781398375147, 9781398375048, 1398375144, 1398375047
https://ebooknice.com/product/cambridge-igcse-and-o-level-history-
workbook-2c-depth-study-the-united-states-1919-41-2nd-edition-53538044
https://ebooknice.com/product/functional-programming-patterns-in-
scala-and-clojure-5496598
https://ebooknice.com/product/learn-physics-with-functional-
programming-a-hands-on-guide-to-exploring-physics-with-
haskell-47159110
https://ebooknice.com/product/primary-mathematics-3a-33552624
https://ebooknice.com/product/programming-scala-scalability-
functional-programming-objects-29886228
Functional Programming: A
PragPub Anthology
Exploring Clojure, Elixir, Haskell, Scala, and Swift
Every precaution was taken in the preparation of this book. However, the publisher
assumes no responsibility for errors or omissions, or for damages that may result from
the use of information (including program listings) contained herein.
About the Pragmatic Bookshelf
The Pragmatic Bookshelf is an agile publishing company. We’re here because we
want to improve the lives of developers. We do this by creating timely, practical titles,
written by programmers for programmers.
Our Pragmatic courses, workshops, and other products can help you and your team
create better software and have more fun. For more information, as well as the latest
Pragmatic titles, please visit us at http://pragprog.com.
Our ebooks do not contain any Digital Restrictions Management, and have always
been DRM-free. We pioneered the beta book concept, where you can purchase and
read a book while it’s still being written, and provide feedback to the author to help
make a better book for everyone. Free resources for all purchasers include source code
downloads (if applicable), errata and discussion forums, all available on the book's
home page at pragprog.com. We’re here to make your life easier.
Andy Hunt
The Pragmatic Programmers
The team that produced this book includes: Andy Hunt (Publisher),
Janet Furlow (VP of Operations), Susannah Davidson Pfalzer (Executive Editor),
Potomac Indexing, LLC (Indexing), Nicole Abramowitz (Copy Editor),
Gilson Graphics (Layout)
Introduction
Acknowledgements
Bibliography
→ Ben Vandgrift
Chief architect, Oryx Systems Inc.
Programming’s last sea change was in the 1990s when object orientation went
mainstream. It’s happening again, but this time it’s functional programming
that’s sweeping through our profession. Read this book to understand why and to
learn how to ride the wave.
→ Paul Butcher
Founder and CTO, writeandimprove.com
I really enjoyed the structure and flow of the book. The chapters stand on their
own as essays but when put together make a strong argument for functional
programming, regardless of the language. It’s also a treat to see all these
different familiar writers write about diverse languages.
→ Ben Marx
Lead engineer, Bleacher Report
You’re sure to find a way functional programming resonates with you with the
wealth of approaches and languages covered. The treatment of Scala collection
is superb: everything a beginner needs to know from the get-go!
→ Jeff Heon
Research software developer, CRIM
Introduction
by Michael Swaine
This book shows how five different languages approach the paradigm of
functional programming. The chapters were written by experts in the different
languages and first appeared as articles in PragPub magazine. After publishing
nearly one hundred issues of the magazine, it became clear that we were in
possession of a wealth of information about functional programming, and we
decided that some of the best articles would make an interesting book.
Certain concepts and issues are sure to come up in any discussion of functional
programming. Recursion. Lazy evaluation. Referential transparency. Eliminating
side effects. Functions as first-class objects. Higher-level functions. Currying.
Immutable data. Type systems. Pattern matching. The authors touch on all these
concepts, looking at them from the perspective of different languages.
Most of the chapters in this book first appeared as articles in PragPub magazine,
and I am grateful to the authors not only for the original articles but for the
editing—in some cases extensive—that they helped me with in the process of
turning magazine articles into book chapters. Read Appendix 1, Meet the
Authors. I think you’ll be impressed.
I also need to thank Gilson Graphics for its design and production work, Nancy
Groth for original editing of the articles for magazine publication, and the
technical editors who gave generously of their time and expertise, including Paul
Butcher, Ian Dees, Jeff Heon, Ron Jeffries, and Kim Shrier.
I hope you enjoy this first in what I hope will be a line of PragPub anthologies.
The summer I moved to Silicon Valley was the summer they decommissioned
ILLIAC IV at Moffett Field.
We’ve Seen This Movie Before
In 1981, the center of attention in computing had shifted from massive machines
programmed by a white-coated priesthood of programmers to cheap desktop
crates built and programmed by scruffy hackers. I’d relocated from the Midwest
to Palo Alto and signed on to help launch a new weekly newsmagazine to cover
the scruffy ones. Meanwhile, just down El Camino at NASA’s Moffett Field,
they were officially shutting down and disassembling the computer that had
inspired Stanley Kubrick and Arthur C. Clarke’s HAL 9000.
The idea behind ILLIAC IV was to break away from the sequential model that
had dominated computing since the start. Certain problem domains, like fluid
dynamics, were best approached by parallel processing, and ILLIAC IV was
specifically designed for just this kind of parallel problems: problems where a
single instruction could be applied in parallel to multiple sets of data. This is
known as SIMD (single instruction, multiple data). The more general case—
multiple instructions operating on multiple data sets, or MIMD—is harder. But
every kind of parallel programming requires new algorithms and a new mindset.
And is an invitation to functional programming.
For the right kind of problems, ones that could be addressed with SIMD,
ILLIAC IV was the fastest computer in the world, and it held the unofficial title
of the fastest machine in the world up to its decommissioning in 1981. It was an
order of magnitude faster than any other computer at the time, and was perfectly
suited to its target applications and to functional programming.
But that era came to an abrupt end. On September 7, 1981, ILLIAC IV was shut
down for good. You can still see part of it on display at the Computer History
Museum in Mountain View, just down the road from Moffett Field.
Why did its era end? From Wikipedia: “Illiac IV was a member of the class of
parallel computers, referred to as SIMD...Moore’s Law overtook the specialized
SIMD ILLIAC approach making the MIMD approach preferred for almost all
scientific computing.”
But along the way, it acquired another place in history, as the inspiration for
HAL 9000 in 2001: A Space Odyssey. Arthur C. Clarke was no neophyte
regarding computers: he had talked with Turing at Bletchley Park and was an
avid follower of developments in microcomputers. Clarke was intrigued when he
learned of work on ILLIAC IV at the University of Illinois at Urbana-
Champaign, and honored the campus in the movie as HAL 9000’s birthplace.
Flash forward to the 00s. The use case that made FP worth learning was again
parallel processing, but driven by the advent of multicore processors. “The
chipmakers,” I claimed at the time, “have essentially said that the job of
enforcing Moore’s Law is now a software problem. They will concentrate on
putting more and more cores on a die, and it’s up to you to recraft your software
to take advantage of the parallel-processing capabilities of their chips.”
The impetus for FP in the 2000s was again the desire to break free of the
sequential model, and there were different approaches being offered. If you were
heavily invested in Java skills and tools, and didn’t want to toss aside the code
libraries, the skills, and the tools you counted on, you could use Martin
Odersky’s Scala language, recently released on the Java platform. It was also
offered on the .NET platform, although (oops) support was dropped in 2012.
.NETters were better off looking to F#, created by Don Syme at Microsoft
Research. If you wanted a more purely functional language, you had Erlang,
developed for highly parallel programming by Joe Armstrong at Ericsson, or
Haskell, or many other options.
What all these languages offered was the ability to work in the functional
paradigm. The two defining features of the functional paradigm are that all
computations are treated as the evaluation of a function and that you avoid
changing state and mutable data. But there are some additional common features
of functional programming:
Iterative programmers who approached FP for the first time back then might
have added: it’s slow and it’s confusing. It is in fact neither of these, necessarily,
but it does require a different way of thinking about problems and different
algorithms; and to perform adequately, it needed better language support than
was common in the 2000s. That would change over the next decade, and along
with it would change the very purposes for which people were drawn to FP.
Exploring the Variety of Random
Documents with Different Content
had received the usual notes from the Treasury, begging them to be
in their places and to vote against Mr. Fox’s motion. It was asserted
by Mr. Hastings, that, early in the morning of the very day on which
the debate took place, Dundas called on Pitt, woke him, and was
closeted with him many hours. The result of this conference was a
determination to give up the late Governor-General to the vengeance
of the Opposition. It was impossible even for the most powerful
minister to cany all his followers with him in so strange a course.
Several persons high in office, the Attorney-General, Mr. Grenville,
and Lord Mulgrave, divided against Mr. Pitt. But the devoted
adherents who stood by the head of the government without asking
questions were sufficiently numerous to turn the scale. A hundred
and nineteen members voted for Mr. Fox’s motion; seventy nine
against it. Dundas silently followed Pitt.
That good and great man, the late William Wilberforce, often
related the events of this remarkable night. He described the
amazement of the House, and the bitter reflections which were
muttered against the Prime Minister by some of the habitual
supporters of government. Pitt himself appeared to feel that his
conduct required some explanation. He left the treasury bench, sat
for some time next to Mr. Wilberforce, and very earnestly declared
that he had found it impossible, as a man of conscience, to stand
any longer by Hastings. The business, he said, was too bad. Mr.
Wilberforce, we are bound to add, fully believed that his friend was
sincere, and that the suspicions to which this mysterious affair gave
rise were altogether unfounded.
Those suspicions, indeed, were such as it is painful to mention.
The friends of Hastings, most of whom, it is to be observed,
generally supported the administration, affirmed that the motive of
Pitt and Dundas was jealousy. Hastings was personally a favourite
with the King. He was the idol of the East India Company and of its
servants. If he were absolved by the Commons, seated among the
Lords, admitted to the Board of Control, closely allied with the
strong-minded and imperious Thurlow, was it not almost certain that
he would soon draw to himself the entire management of Eastern
affairs? Was it not possible that he might become a formidable rival
in the cabinet? It had probably got abroad that very singular
communications had taken place between Thurlow and Major Scott,
and that, if the First Lord of the Treasury was afraid to recommend
Hastings for a peerage, the Chancellor was ready to take the
responsibility of that step on himself. Of all ministers, Pitt was the
least likely to submit with patience to such an encroachment on his
functions. If the Commons impeached Hastings, all danger was at an
end. The proceeding, however it might terminate, would probably
last some years. In the mean time, the accused person would be
excluded from honours and public employments, and could scarcely
venture even to pay his duty at court. Such were the motives
attributed by a great part of the public to the young minister, whose
ruling passion was generally believed to be avarice of power.
The prorogation soon interrupted the discussions respecting
Hastings. In the following year, those discussions were resumed. The
charge touching the spoliation of the Begums was brought forward
by Sheridan, in a speech which was so imperfectly reported that it
may be said to be wholly lost, but which was, without doubt, the
most elaborately brilliant of all the productions of his ingenious
mind. The impression which it produced was such as has never been
equalled. He sat down, not merely amidst cheering, but amidst the
loud clapping of hands, in which the Lords below the bar and the
strangers in the gallery joined. The excitement of the House was
such that no other speaker could obtain a hearing; and the debate
was adjourned. The ferment spread fast through the town. Within
four and twenty hours, Sheridan was offered a thousand pounds for
the copyright of the speech, if he would himself correct it for the
press. The impression made by this remarkable display of eloquence
on severe and experienced critics, whose discernment may be
supposed to have been quickened by emulation, was deep and
permanent. Mr. Windham, twenty years later, said that the speech
deserved all its fame, and was, in spite of some faults of taste, such
as were seldom wanting either in the literary or in the parliamentary
performances of Sheridan, the finest that had been delivered within
the memory of man. Mr. Fox, about the same time, being asked by
the late Lord Holland what was the best speech ever made in the
Home of Commons, assigned the first place, without hesitation, to
the great oration of Sheridan on the Oude charge.
When the debate was resumed, the tide ran so strongly against
the accused that his friends were coughed and scraped down. Pitt
declared himself for Sheridan’s motion; and the question was carried
by a hundred and seventy-five votes against sixty-eight.
The Opposition, flushed with victory and strongly supported by the
public sympathy, proceeded to bring forward a succession of charges
relating chiefly to pecuniary transactions. The friends of Hastings
were discouraged, and, having now no hope of being able to avert
an impeachment, were not very strenuous in their exertions. At
length the House, having agreed to twenty articles of charge,
directed Burke to go before the Lords, and to impeach the late
Governor-General of High Crimes and Misdemeanours. Hastings was
at the same time arrested by the Serjeant-at-arms and carried to the
bar of the Peers.
The session was now within ten days of its close. It was,
therefore, impossible that any progress could be made in the trial till
the next year. Hastings was admitted to bail; and further
proceedings were postponed till the Houses should re-assemble.
When Parliament met in the following winter, the Commons
proceeded to elect a committee for managing the impeachment.
Burke stood at the head; and with him were associated most of the
leading members of the Opposition. But when the name of Francis
was read a fierce contention arose. It was said that Francis and
Hastings were notoriously on bad terms, that they had been at feud
during many years, that on one occasion their mutual aversion had
impelled them to seek each other’s lives, and that it would be
improper and indelicate to select a private enemy to be a public
accuser. It was urged on the other side with great force, particularly
by Mr. Windham, that impartiality, though the first duty of a judge,
had never been reckoned among the qualities of an advocate; that
in the ordinary administration of criminal justice among the English,
the aggrieved party, the very last person who ought to be admitted
into the jury-box, is the prosecutor; that what was wanted in a
manager was, not that he should be free from bias, but that he
should be able, well informed, energetic, and active. The ability and
information of Francis were admitted; and the very animosity with
which he was reproached, whether a virtue or a vice, was at least a
pledge for his energy and activity. It seems difficult to refute these
arguments. But the inveterate hatred borne by Francis to Hastings
had excited general disgust. The House decided that Francis should
not be a manager. Pitt voted with the majority, Dundas with the
minority.
In the mean time, the preparations for the trial had proceeded
rapidly; and on the thirteenth of February, 1788, the sittings of the
Court commenced. There have been spectacles more dazzling to the
eye, more gorgeous with jewellery and cloth of gold, more attractive
to grown-up children, than that which was then exhibited at
Westminster; but, perhaps, there never was a spectacle so well
calculated to strike a highly cultivated, a reflecting, an imaginative
mind. All the various kinds of interest which belong to the near and
to the distant, to the present and to the past, were collected on one
spot and in one hour. All the talents and all the accomplishments
which are developed by liberty and civilisation were now displayed,
with every advantage that could be derived both from co-operation
and from contrast. Every step in the proceedings carried the mind
either backward, through many troubled centuries, to the days when
the foundations of our constitution were laid; or far away, over
boundless seas and deserts, to dusky nations living under strange
stars, worshipping strange gods, and writing strange characters from
right to left. The High Court of Parliament was to sit, according to
forms handed down from the days of the Plantagenets, on an
Englishman accused of exercising tyranny over the lord of the holy
city of Benares, and over the ladies of the princely house of Oude.
The place was worthy of such a trial. It was the great hall of
William Rufus, the hall which had resounded with acclamations at
the inauguration of thirty kings, the hall which had witnessed the
just sentence of Bacon and the just absolution of Somers, the hall
where the eloquence of Strafford had for a moment awed and
melted a victorious party inflamed with just resentment, the hall
where Charles had confronted the High Court of Justice with the
placid courage which has half redeemed his fame. Neither military
nor civil pomp was wanting. The avenues were lined with
grenadiers. The streets were kept clear by cavalry. The peers, robed
in gold and ermine, were marshalled by the heralds under Garter
King-at-arms. The judges in their vestments of state attended to
give advice on points of law. Near a hundred and seventy lords,
three fourths of the Upper House as the Upper House then was,
walked in solemn order from their usual place of assembling to the
tribunal. The junior Baron present led the way, George Eliott, Lord
Heathfield, recently ennobled for his memorable defence of Gibraltar
against the fleets and armies of France and Spain. The long
procession was closed by the Duke of Norfolk, Earl Marshal of the
realm, by the great dignitaries, and by the brothers and sons of the
King. Last of all came the Prince of Wales, conspicuous by his fine
person and noble bearing. The grey old walls were hung with
scarlet. The long galleries were crowded by an audience such as has
rarely excited the fears or the emulations of an orator. There were
gathered together, from all parts of a great, free, enlightened, and
prosperous empire, grace and female loveliness, wit and learning,
the representatives of every science and of every art. There were
seated round the Queen the fairhaired young daughters of the
House of Brunswick. There the Ambassadors of great Kings and
Commonwealths gazed with admiration on a spectacle which no
other country in the world could present. There Siddons, in the
prime of her majestic beauty, looked with emotion on a scene
surpassing all the imitations of the stage. There the historian of the
Roman Empire thought of the days when Cicero pleaded the cause
of Sicily against Verres, and when, before a senate which still ret
ained some show of freedom, Tacitus thundered against the
oppressor of Africa. There were seen side by side the greatest
painter and the greatest scholar of the age. The spectacle had
allured Reynolds from that easel which has preserved to us the
thoughtful foreheads of so many writers and statesmen, and the
sweet smiles of so many noble matrons. It had induced Parr to
suspend his labours in that dark and profound mine from which he
had extracted a vast treasure of erudition, a treasure too often
bulled in the earth, too often paraded with injudicious and inelegant
ostentation, but still precious, massive, and splendid. There
appeared the voluptuous charms of her to whom the heir of the
throne had in secret plighted his faith. There too was she, the
beautiful mother of a beautiful race, the Saint Cecilia, whose delicate
features, lighted up by love and music, art has rescued from the
common decay. There wore the members of that brilliant society
which quoted, criticized, and exchanged repartees, under’ the rich
peacock-hangings of Mrs. Montague. And there the ladies whose
lips, more persuasive than those of Fox himself, had carried the
Westminster election against palace and treasury, shone around
Georgi-ana Duchess of Devonshire.
The Serjeants made proclamation. Hastings advanced to the bar,
and bent his knee. The culprit was indeed not unworthy of that great
presence. He had ruled an extensive and populous country, had
made laws and treaties, had sent forth armies, had set up and pulled
down princes. And in his high place he had so borne himself, that all
had feared him, that most had loved him, and that hatred itself
could deny him no title to glory, except virtue. He looked like a great
man, and not like a bad man. A person small and emaciated, yet
deriving dignity from a carriage which, while it indicated deference
to the court, indicated also habitual self-possession and self-respect,
a high and intellectual forehead, a brow pensive, but not gloomy, a
mouth of inflexible decision, a face pale and worn, but serene, on
which was written, as legibly as under the picture in the council-
chamber at Calcutta, Mens aequa in arduis; such was the aspect
with which the great Proconsul presented himself to his judges.
His counsel accompanied him, men all of whom were afterwards
raised by their talents and learning to the highest posts in their
profession, the bold and strong-minded Law, afterwards Chief
Justice of the King’s Bench; the more humane and eloquent Dallas,
afterwards Chief Justice of the Common Pleas; and Plomer who,
near twenty years later, successfully conducted in the same high
court the defence of Lord Melville, and subsequently became Vice-
chancellor and Master of the Rolls.
But neither the culprit nor his advocates attracted so much notice
as the accusers. In the midst of the blaze of red drapery, a space
had been fitted up with green benches and tables for the Commons.
The managers, with Burke at their head, appeared in full dress. The
collectors of gossip did not fail to remark that even Fox, generally so
regardless of his appearance, had paid to the illustrious tribunal the
compliment of wearing a bag and sword. Pitt had refused to be one
of the conductors of the impeachment; and his commanding,
copious, and sonorous eloquence was wanting to that great muster
of various talents. Age and blindness had unfitted Lord North for the
duties of a public prosecutor; and his friends were left without the
help of his excellent sense, his tact, and his urbanity. But, in spite of
the absence of these two distinguished members of the Lower
House, the box in which the managers stood contained an array of
speakers such as perhaps had not appeared together since the great
age of Athenian eloquence. There were Fox and Sheridan, the
English Demosthenes and the English Hyperides. There was Burke,
ignorant, indeed, or negligent of the art of adapting his reasonings
and his style to the capacity and taste of his hearers, but in
amplitude of comprehension and richness of imagination superior to
every orator, ancient or modern. There, with eyes reverentially fixed
on Burke, appeared the finest gentleman of the age, his form
developed by every manly exercise, his face beaming with
intelligence and spirit, the ingenious, the chivalrous, the high-souled
Windham. Nor, though surrounded by such men, did the youngest
manager pass unnoticed. At an age when most of those who
distinguish themselves in life are still contending for prizes and
fellowships at college, He had won for himself a conspicuous place in
parliament. No advantage of fortune or connection was wanting that
could set off to the height his splendid talents and his unblemished
honour. At twenty-three he had been thought worthy to be ranked
with the veteran statesmen who appeared as the delegates of the
British Commons, at the bar of the British nobility. All who stood at
that bar, save him alone, are gone, culprit, advocates, accusers. To
the generation which is now in the vigour of life, he is the sole
representative of a great age which has passed away. But those
who, within the last ten years, have listened with delight, till the
morning sun shone on the tapestries of the House of Lords, to the
lofty and animated eloquence of Charles Earl Grey, are able to form
some estimate of the powers of a race of men among whom he was
not the foremost.
The charges and the answers of Hastings were first read. The
ceremony occupied two whole days, and was rendered less tedious
than it would otherwise have been by the silver voice and just
emphasis of Cowper, the clerk of the court, a near relation of the
amiable poet. On the third day Burke rose. Four sittings were
occupied by his opening speech, which was intended to be a general
introduction to all the charges. With an exuberance of thought and a
splendour of diction which more than satisfied the highly raised
expectation of the audience, he described the character and
institutions of the natives of India, recounted the circumstances in
which the Asiatic empire of Britain had originated, and set forth the
constitution of the Company and of the English presidencies. Having
thus attempted to communicate to his hearers an idea of Eastern
society, as vivid as that which existed in his own mind, he proceeded
to arraign the administration of Hastings as systematically conducted
in defiance of morality and public law. The energy and pathos of the
great orator extorted expressions of unwonted admiration from the
stern and hostile Chancellor, and, for a moment, seemed to pierce
even the resolute heart of the defendant. The ladies in the galleries,
unaccustomed to such displays of eloquence, excited by the
solemnity on the occasion, and perhaps not unwilling to display their
taste and sensibility, were in a state of uncontrollable emotion.
Handkerchiefs were pulled out; smelling bottles were handed round;
hysterical sobs and screams were heard: and Mrs. Sheridan was
carried out in a fit. At length the orator concluded. Raising his voice
till the old arches of Irish oak resounded, “Therefore,” said he, “hath
it with all confidence been ordered, by the Commons of Great
Britain, that I impeach Warren Hastings of high crimes and
misdemeanours. I impeach him in the name of the Commons’ House
of Parliament, whose trust he has betrayed. I impeach him in the
name of the English nation, whose ancient honour he has sullied. I
impeach him in the name of the people of India, whose rights he
has trodden under foot, and whose country he has turned into a
desert. Lastly, in the name of human nature itself, in the name of
both sexes, in the name of every age, in the name of every rank, I
impeach the common enemy and oppressor of all!”
When the deep murmur of various emotions had subsided, Mr. Fox
rose to address the Lords respecting the course of proceeding to be
followed. The wish of the accusers was that the Court would bring to
a close the investigation of the first charge before the second was
opened. The wish of Hastings and of his counsel was that the
managers should open all the charges, and produce all the evidence
for the prosecution, before the defence began. The Lords retired to
their own House to consider the question. The Chancellor took the
side of Hastings. Lord Loughborough, who was now in opposition,
supported the demand of the managers. The division showed which
wav the inclination of the tribunal leaned. A majority of near three to
one decided in favour of the course for which Hastings contended.
When the Court sat again, Mr. Fox, assisted by Mr. Grey, opened
the charge respecting Cheyte Sing, and several days were spent in
reading papers and hearing witnesses. The next article was that
relating to the Princesses of Onde. The conduct of this part of the
case was intrusted to Sheridan. The curiosity of the public to hear
him was unbounded. His sparkling and highly finished declamation
lasted two days; but the Hall was crowded to suffocation during the
whole time. It was said that fifty guineas had been paid for a single
ticket. Sheridan, when he concluded, contrived, with a knowledge of
stage effect which his father might have envied, to sink back, as if
exhausted, into the arms of Burke, who hugged him with the energy
of generous admiration.
June was now far advanced. The session could not last much
longer; and the progress which had been made in the impeachment
was not very satisfactory. There were twenty charges. On two only
of these had even the case for the prosecution been heard; and it
was now a year since Hastings had been admitted to bail.
The interest taken by the public in the trial was great when the
Court began to sit, and rose to the height when Sheridan spoke on
the charge relating to the Begums. From that time the excitement
went down fast. The spectacle had lost the attraction of novelty. The
great displays of rhetoric were over. What was behind was not of a
nature to entice men of letters from their books in the morning, or to
tempt ladies who had left the masquerade at two to be out of bed
before eight. There remained examinations and cross-examinations.
There remained statements of accounts. There remained the reading
of papers, filled with words unintelligible to English cars, with lacs
and crores, zemindars and aumils, sunnuds and perwannahs,
jaghires and nuzzurs. There remained bickerings, not always carried
on with the best taste or with the best temper, between the
managers of the impeachment and the counsel for the defence,
particularly between Mr. Burke and Mr. Law. There remained the
endless marches and countermarches of the Peers between their
House and the Hall: for as often as a point of law was to be
discussed, their Lordships retired to discuss it apart; and the
consequence was, as a Peer wittily said, that the judges walked and
the trial stood still.
It is to be added that, in the spring of 1788, when the trial
commenced, no important question, either of domestic or foreign
policy, occupied the public mind. The proceeding in Westminster
Hall, therefore, naturally attracted most of the attention of
Parliament and of the country. It was the one great event of that
season. But in the following year the King’s illness, the debates on
the Regency, the expectation of a change of ministry, completely
diverted public attention from Indian affairs; and within a fortnight
after George the Third had returned thanks in St. Paul’s for his
recovery, the States-General of France met at Versailles, In the midst
of the agitation produced by these events, the impeachment was for
a time almost forgotten.
The trial in the Hall went on languidly. In the session of 1788,
when the proceedings had the interest of novelty, and when the
Peers had little other business before them, only thirty-five days
were given to the impeachment. In 1789, the Regency Bill occupied
the Upper House till the session was far advanced. When the Kino;
recovered the circuits were beginning. The judges left town; the
Lords waited for the return of the oracles of jurisprudence; and the
consequence was that during the whole year only seventeen days
were given to the case of Hastings. It was clear that the matter
would be protracted to a length unprecedented in the annals of
criminal law.
In truth, it is impossible to deny that impeachment, though it is a
fine ceremony, and though it may have been useful in the
seventeenth century, is not a proceeding from which much good can
now be expected. Whatever confidence may be placed in the
decision of the Peers on an appeal arising out of ordinary litigation, it
is certain that no man has the least confidence in their impartiality,
when a great public functionary, charged with a great state crime, is
brought to their bar. They are all politicians. There is hardly one
among them whose vote on an impeachment may not be confidently
predicted before a witness has been examined; and, even if it were
possible to rely on their justice, they would still be quite unfit to try
such a cause as that of Hastings. They sit only during half the year.
They have to transact much legislative and much judicial business.
The law-lords, whose advice is required to guide the unlearned
majority, are employed daily in administering justice elsewhere. It is
impossible, therefore, that, during a busy session, the Upper House
should give more than a few days to an impeachment.
To expect that their Lordships would give up partridge-shooting, in
order to bring the greatest delinquent, to speedy justice, or to
relieve accused innocence by speedy acquittal, would be
unreasonable indeed. A well constituted tribunal, sitting regularly six
days in the week, and nine hours in the day, would have brought the
trial of Hastings to a close in less than three months. The Lords had
not finished their work in seven years.
The result ceased to be matter of doubt, from the time when the
Lords resolved that they would be guided by the rules of evidence
which are received in the inferior courts of the realm. Those rules, it
is well known, exclude much information which would be quite
sufficient to determine the conduct of any reasonable man, in the
most important transactions of private life. These rules, at every
assizes, save scores of culprits whom judges, jury, and spectators,
firmly believe to be guilty. But when those rules were rigidly applied
to offences committed many years before, at the distance of many
thousands of miles, conviction was, of course, out of the question.
We do not blame the accused and his counsel for availing
themselves of every legal advantage in order to obtain an acquittal.
But it is clear that an acquittal so obtained cannot be pleaded in bar
of the judgment of history.
Several attempts were made by the friends of Hastings to put a
stop to the trial. In 1780 they proposed a vote of censure upon
Burke, for some violent language which he had used respecting the
death of Nuncomar and the connection between Hastings and
Impey. Burke was then unpopular in the last degree both with the
House and with the country. The asperity and indecency of some
expressions which he had used during the debates on the Regency
had annoyed even his warmest friends. The vote of censure was
carried; and those who had moved it hoped that the managers
would resign in disgust. Burke was deeply hurt. But his zeal for what
he considered as the cause of justice and mercy triumphed over his
personal feelings. He received the censure of the House with dignity
and meekness, and declared that no personal mortification or
humiliation should induce him to flinch from the sacred duty which
he had undertaken.
In the following year the Parliament was dissolved; and the friends
of Hastings entertained a hope that the new House of Commons
might not be disposed to go on with the impeachment. They began
by maintaining that the whole proceeding was terminated by the
dissolution. Defeated on this point, they made a direct motion that
the impeachment, should be dropped; but they were defeated by
the combined forces of the Government and the Opposition. It was,
however, resolved that, for the sake of expedition, many of the
articles should be withdrawn. In truth, had not some such measure
been adopted, the trial would have lasted till the defendant was in
his grave.
At length, in the spring of 1795, the decision was pronounced,
near eight years after Hastings had been brought by the Serjeant-at-
arms of the Commons to the bar of the Lords. On the last day of this
great procedure the public curiosity, long suspended, seemed to be
revived. Anxiety about the judgment there could be none; for it had
been fully ascertained that there was a great majority for the
defendant. Nevertheless many wished to see the pageant, and the
Hall was as much crowded as on the first day. But those who, having
been present on the first day, now bore a part in the proceedings of
the last, were few; and most of those few were altered men.
As Hastings himself said, the arraignment had taken place before
one generation, and the judgment was pronounced by another. The
spectator could not look at the woolsack, or at the red benches of
the Peers, or at the green benches of the Commons, without seeing
something that reminded him of the instability of all human things,
of the instability of power and tame and life, of the more lamentable
instability of friendship. The great seal was borne before Lord
Loughborough, who, when the trial commenced, was a fierce
opponent of Mr. Pitt’s government, and who was now a member of
that government, while Thurlow, who presided in the Court when it
first sat, estranged from all his old allies, sat scowling among the
junior barons. Of about a hundred and sixty nobles who walked in
the procession on the first day, sixty had been laid in their family
vaults. Still more affecting must have been the sight of the
managers’ box. What had become of that fair fellowship, so closely
bound together by public and private ties, so resplendent with every
talent and accomplishment? It had been scattered by calamities
more bitter than the bitterness of death. The great chiefs were still
living, and still in the full vigour of their genius. But their friendship
was at an end. It had been violently and publicly dissolved, with
tears and stormy reproaches. If those men, once so dear to each
other, were now compelled to meet for the purpose of managing the
impeachment, they met as strangers whom public business had
brought together, and behaved to each other with cold and distant
civility. Burke had in his vortex whirled away Windham. Fox had
been followed by Sheridan and Grey.
Only twenty-nine Peers voted. Of these only six found Hastings
guilty on the charges relating to Cheyte Sing and to the Begums. On
other charges, the majority in his favour was still greater. On some
he was unanimously absolved. He was then called to the bar, was
informed from the woolsack that the Lords had acquitted him, and
was solemnly discharged. He bowed respectfully and retired.
We have said that the decision had been fully expected. It was
also generally approved. At the commencement of the trial there had
been a strong and indeed unreasonable feeling against Hastings. At
the close of the trial there was a feeling equally strong and equally
unreasonable in his favour. One cause of the change was, no doubt,
what is commonly called the fickleness of the multitude, but what
seems to us to be merely the general law of human nature. Both in
individuals and in masses violent excitement is always followed by
remission, and often by reaction. We are all inclined to depreciate
whatever we have overpraised, and, on the other hand, to show
undue indulgence where we have shown undue rigour. It was thus in
the case of Hastings. The length of his trial, moreover, made him an
object of compassion. It was thought, and not without reason, that,
even if he was guilty, he was still an ill-used man, and that an
impeachment of eight years was more than a sufficient punishment.
It was also felt that, though, in the ordinary course of criminal law, a
defendant is not allowed to set off his good actions against his
crimes, a great political cause should be tried on different principles,
and that a man who had governed an empire during thirteen years
might have done some very reprehensible things, and yet might be
on the whole deserving of rewards and honours rather than of fine
and imprisonment. The press, an instrument neglected by the
prosecutors, was used by Hastings and his friends with great effect.
Every ship, too that arrived from Madras or Bengal, brought a cuddy
full of his admirers. Every gentleman from India spoke of the late
Governor-General as having deserved better, and having been
treated worse, than any man living. The effect of this testimony
unanimously given by all persons who knew the East was naturally
very great. Retired members of the Indian services, civil and military,
were settled in all corners of the kingdom. Each of them was, of
course, in his own little circle, regarded as an oracle on an Indian
question, and they were, with scarcely one exception, the zealous
advocates of Hastings. It is to be added, that the numerous
addresses to the late Governor-General, which his friends in Bengal
obtained from the natives and transmitted to England, made a
considerable impression. To these addresses we attach little or no
importance. That Hastings was beloved by the people whom he
governed is true; but the eulogies of pundits, zemindars,
Mahommedan doctors, do not prove it to be true. For an English
collector or judge would have found it easy to induce any native who
could write to sign a panegyric on the most odious ruler that ever
was in India. It was said that at Benares, the very place at which the
acts set forth in the first article of impeachment had been
committed, the natives had erected a temple to Hastings, and this
story excited a strong sensation in England. Burke’s observations on
the apotheosis were admirable. He saw no reason for astonishment,
he said, in the incident which had been represented as so striking.
He knew something of the mythology of the Brahmins. He knew that
as they worshipped some gods from love, so they worshipped others
from fear. He knew that they erected shrines, not only to the
benignant deities of light and plenty, but also to the fiends who
preside over smallpox and murder; nor did he at all dispute the claim
of Mr. Hastings to be admitted into such a Pantheon. This reply has
always struck us as one of the finest that ever was made in
Parliament. It is a grave and forcible argument, decorated by the
most brilliant wit and fancy.
Hastings was, however, safe. But in every thing except character,
he would have been far better off if, when first impeached, he had at
once pleaded guilty, and paid a fine of fifty thousand pounds. He
was a ruined man. The legal expenses of his defence had been
enormous. The expenses which did not appear in his attorney’s bill
were perhaps larger still. Great sums had been paid to Major Scott.
Great sums had been laid out in bribing newspapers, rewarding
pamphleteers, and circulating tracts. Burke, so early as 1790,
declared in the House of Commons that twenty thousand pounds
had been employed in corrupting the press. It is certain that no
controversial weapon, from the gravest reasoning to the coarsest
ribaldry, was left unemployed. Logan defended the accused
Governor with great ability in prose. For the lovers of verse, the
speeches of the managers were burlesqued in Simpkin’s letters. It is,
we are afraid, indisputable that Hastings stooped so low as to court
the aid of that malignant and filthy baboon John Williams, who
called himself Anthony Pasquin. It was necessary to subsidise such
allies largely. The private hoards of Mrs. Hastings had disappeared.
It is said that the banker to whom they had been intrusted had
failed. Still if Hastings had practised strict economy, he would, after
all his losses, have had a moderate competence; but in the
management of his private affairs he was imprudent. The clearest
wish of his heart had always been to regain Daylesford. At length, in
the very year in which his trial commenced, the wish was
accomplished; and the domain, alienated more than seventy years
before, returned to the descendant of its old lords. But the manor
house was a ruin; and the grounds round it had, during many years,
been utterly neglected. Hastings proceeded to build, to plant, to
form a sheet of water, to excavate a grotto; and, before he was
dismissed from the bar of the House of Lords, he had expended
more than forty thousand pounds in adorning his seat.
The general feeling both of the Directors and of the proprietors of
the East India Company was that he had great claims on them, that
his services to them had been eminent, and that his misfortunes had
been the effect of his zeal for their interest. His friends in Leadenhall
Street proposed to reimburse him the costs of his trial, and to settle
on him an annuity of five thousand pounds a year. But the consent
of the Board of Control was necessary; and at the head of the Board
of Control was Mr. Dundas, who had himself been a party to the
impeachment, who had, on that account, been reviled with great
bitterness by the adherents of Hastings, and who, therefore, was not
in a very complying mood. He refused to consent to what the
Directors suggested. The Directors remonstrated. A long controversy
followed. Hastings, in the mean time, was reduced to such distress,
that he could hardly pay his weekly bills. At length a compromise
was made. An annuity for life of four thousand pounds was settled
on Hastings; and in order to enable him to meet pressing demands,
he was to receive ten years’ annuity in advance. The Company was
also permitted to lend him fifty thousand pounds, to be repaid by
instalments without interest. The relief, though given in the most
absurd manner, was sufficient to enable the retired Governor to live
in comfort, and even in luxury, if he had been a skilful manager. But
he was careless and profuse, and was more than once under the
necessity of applying to the Company for assistance, which was
liberally given.
He had security and affluence, but not the power and dignity
which, when he landed from India, he had reason to expect. He had
then looked forward to a coronet, a red riband, a seat at the Council
Board, an office at Whitehall. He was then only fifty-two, and might
hope for many years of bodily and mental vigour. The case was
widely different when he left the bar of the Lords. He was now too
old a man to turn his mind to a new class of studies and duties. He
had no chance of receiving any mark of royal favour while Mr. Pitt
remained in power; and, when Mr. Pitt retired, Hastings was
approaching his seventieth year.
Once, and only once, after his acquittal, he interfered in polities;
and that interference was not much to his honour. In 1804 he
exerted himself strenuously to prevent Mr. Addington, against whom
Fox and Pitt had combined, from resigning the Treasury. It is difficult
to believe that a man so able and energetic as Hastings can have
thought that, when Bonaparte was at Boulogne with a great army,
the defence of our island could safely be intrusted to a ministry
which did not contain a single person whom flattery could describe
as a great statesman. It is also certain that, on the important
question which had raised Mr. Addington to power, and on which he
differed from both Fox and Pitt, Hastings, as might have been
expected, agreed with Fox and Pitt, and was decidedly opposed to
Addington, Religious intolerance has never been the vice of the
Indian service, and certainly was not the vice of Hastings. But Mr.
Addington had treated him with marked favour. Fox had been a
principal manager of the impeachment. To Pitt it was owing that
there had been an impeachment; and Hastings, we fear, was on this
occasion guided by personal considerations, rather than by a regard
to the public interest.
The last twenty-four years of his life were chiefly passed at
Daylesford. He amused himself with embellishing his grounds, riding
fine Arab horses, fattening prize-cattle, and trying to rear Indian
animals and vegetables in England. He sent for seeds of a very fine
custard-apple, from the garden of what had once been his own villa,
among the green hedgerows of Allipore. He tried also to naturalise in
Worcestershire the delicious leechee, almost the only fruit of Bengal
which deserves to be regretted even amidst the plenty of Covent
Garden. The Mogul emperors, in the time of their greatness, had in
vain attempted to introduce into Hindustan the goat of the table-
land of Thibet, whose down supplies the looms of Cashmere with
the materials of the finest shawls. Hastings tried, with no better
fortune, to rear a breed at Daylesford; nor does he seem to have
succeeded better with the cattle of Bootan, whose tails are in high
esteem as the best fans for brushing away the mosquitoes.
Literature divided his attention with his conservatories and his
menagerie. He had always loved books, and they were now
necessary to him. Though not a poet, in any high sense of the word,
he wrote neat and polished lines with great facility, and was fond of
exercising this talent. Indeed, if we must speak out, he seems to
have been more of a Trissotin than was to be expected from the
powers of his mind, and from the great part which he had played in
life. We are assured in these Memoirs that the first thing which he
did in the morning was to write a copy of verses. When the family
and guests assembled, the poem made its appearance as regularly
as the eggs and rolls; and Mr. Gleig requires us to believe that, if
from any accident Hastings came to the breakfast-table without one
of his charming performances in his hand, the omission was felt by
all as a grievous disappointment. Tastes differ widely. For ourselves,
we must say that, however good the breakfasts at Daylesford may
have been,—and we are assured that the tea was of the most
aromatic flavour, and that neither tongue nor venison-pasty was
wanting,—we should have thought the reckoning high if we had
been forced to earn our repast by listening every day to a new
madrigal or sonnet composed by our host. We are glad, however,
that Mr. Gleig has preserved this little feature of character, though
we think it by no means a beauty. It is good to be often reminded of
the inconsistency of human nature, and to learn to look without
wonder or disgust on the weaknesses which are found in the
strongest minds. Dionysius in old times, Frederic in the last century,
with capacity and vigour equal to the conduct of the greatest affairs,
united all the little vanities and affectations of provincial blue-
stockings. These great examples may console the admirers of
Hastings for the affliction of seeing him reduced to the level of the
Hayleys and Sewards.
When Hastings had passed many years in retirement, and had
long outlived the common age of men, he again became for a short
time an object of general attention. In 1813 the charter of the East
India Company was renewed; and much discussion about Indian
affairs took place in Parliament. It was determined to examine
witnesses at the bar of the Commons; and Hastings was ordered to
attend. He had appeared at that bar once before. It was when he
read his answer to charges which Burke had laid on the table. Since
that time twenty-seven years had elapsed; public feeling had
undergone a complete change; the nation had now forgotten his
faults, and remembered only his services. The reappearance, too, of
a man who had been among the most distinguished of a generation
that had passed away, who now belonged to history, and who
seemed to have risen from the dead, could not but produce a
solemn and pathetic effect. The Commons received him with
acclamations, ordered a chair to be set for him, and, when he
retired, rose and uncovered. There were, indeed, a few who did not
sympathize with the general feeling. One or two of the managers of
the impeachment were present. They sate in the same seats which
they had occupied when they had been thanked for the services
which they had rendered in Westminster Hall: for, by the courtesy of
the House, a member who has been thanked in his place is
considered as having a right alwavs to occupy that place. These
gentlemen were not disposed to admit that they had employed
several of the best years of their lives in persecuting an innocent
man. They accordingly kept their seats, and pulled their hats over
their brows; but the exceptions only made the prevailing enthusiasm
more remarkable. The Lords received the old man with similar
tokens of respect. The University of Oxford conferred on him the
degree of’ Doctor of Laws; and, in the Sheldonian Theatre, the
undergraduates welcomed him with tumultuous cheering.
These marks of public esteem were soon followed by marks of
royal favour. Hastings was sworn of the Privy Council, and was
admitted to a long private audience of the Prince Regent, who
treated him very graciously. When the Emperor of Russia and the
King of Prussia visited England, Hastings appeared in their train both
at Oxford and in the Guildhall of London, and, though surrounded by
a crowd of princes and great warriors, was everywhere received with
marks of respect and admiration. He was presented by the Prince
Resent both to Alexander and to Frederic William; and his Royal
Highness went so far as to declare in public that honours far higher
than a seat in the Privy Council were due, and would soon be paid,
to the man who had saved the British dominions in Asia. Hastings
now confidently expected a peerage; but, from some unexplained
cause, he was again disappointed.
He lived about four years longer, in the enjoyment of good spirits,
of faculties not impaired to any painful or degrading extent, and of
health such as is rarely enjoyed by those who attain such an age. At
length, on the twenty-second of August, 1818, in the eighty-sixth
year of his age, he met death with the same tranquil and decorous
fortitude which he had opposed to all the trials of his various and
eventful life.
With all his faults,—and they were neither few nor small,—only
one cemetery was worthy to contain his remains. In that temple of
silence and reconciliation where the enmities of twenty generations
He buried, in the Great Abbey which has during many ages afforded
a quiet resting-place to those whose minds and bodies have been
shattered by the contentions of the Great Hall, the dust of the
illustrious accused should have mingled with the dust of the
illustrious accusers. This was not to be. Yet the place of interment
was not ill-chosen. Behind the chancel of the parish church of
Daylesford, in earth which already held the bones of many chiefs of
the house of Hastings, was laid the coffin of the Greatest man who
has ever borne that ancient and widely extended name. On that very
spot, probably, fourscore years before, the little Warren, meanly clad
and scantily fed, had played with the children of ploughmen. Even
then his young mind had revolved plans which might be called
romantic. Yet, however romantic, it is not likely that they had been
so strange as the truth. Not only had the poor orphan retrieved the
fallen fortunes of his line. Not only had he repurchased the old
lands, and rebuilt the old dwelling. He had preserved and extended
an empire. He had founded a polity. He had administered
government and war with more than the capacity of Richelieu. He
had patronised learning with the judicious liberality of Cosmo. He
had been attacked by the most formidable combination of enemies
that ever sought the destruction of a single victim: and over that
combination, after a struggle of ten years, he had triumphed. He
had at length gone down to his grave in the fulness of age in peace,
after so many troubles, in honour, after so much obloquy.
Those who look on his character without favour or malevolence
will pronounce that, in the two great elements of all social virtue, in
respect for the rights of others, and in sympathy for the sufferings of
others, he was deficient. His principles were somewhat lax. His heart
was somewhat hard. But though we cannot with truth describe him
either as a righteous or as a merciful ruler, we cannot regard without
admiration the amplitude and fertility of his intellect, his rare talents
for command, for administration, and for controversy, his dauntless
courage, his honourable poverty, his fervent zeal for the interests of
the state, his noble equanimity, tried by both extremes of fortune,
and never disturbed by either.
FREDERIC THE GREAT. (1)
(Edinburgh Review, April, 1842.)
T
his work, which has the high honour of being introduced to
the world by the author of Loehiel and Hohenlinden, is not
wholly unworthy of so distinguished a chaperon. It professes,
indeed, to be no more than a compilation; but it is an exceedingly
amusing compilation, and we shall be glad to have more of it. The
narrative comes down at present only to the commencement of the
Seven Years’ War, and therefore does not comprise the most
interesting portion of Frederic’s reign.
It may not be unacceptable to our readers that we should take
this opportunity of presenting them with a slight sketch of the life of
the greatest king that has, in modern times, succeeded by right of
birth to a throne. It may, we fear, be impossible to compress so long
and eventful a story within the limits which we must prescribe to
ourselves. Should we be compelled to break off, we may perhaps,
when the continuation of this work appears, return to the subject.
The Prussian monarchy, the youngest of the great European
states, but in population and revenue the fifth among them, and in
art, science, and civilisation entitled to the third, if not to the second
place, sprang
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebooknice.com