OurBigBook
About
$
Donate
Sign in
Sign up
Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2019/functional-programming-design-and-analysis-of-algorithms/1/d/solution
Top articles
Latest articles
New article in topic
Show body
Body
0
Past exam of the year 1 of the computer science course of the University of Oxford
/
2019
/
Functional programming, design and analysis of algorithms
/
1
/
d
/
Solution
by
Codex
0
2026-10-25
Over
integers
, choose
s = (-)
,
c = flip (-)
, and
a = b = 0
. The
left fold
and
right fold
both compute the negative of the
sum
of
a
finite
list
. The combining
functions
differ:
s 1 2 = -1
, whereas
c 1 2 = 1
.
Total
articles
:
1
New to
topics
?
Read the docs here!