• Home
  • Textbooks
  • Programming in Haskell
  • Introduction

Programming in Haskell

Graham Hutton

Chapter 1

Introduction - all with Video Answers

Educators


Chapter Questions

View

Problem 1

Give another possible calculation for the result of double (double 2).

David Collins
David Collins
Numerade Educator
03:27

Problem 2

Show that sum $[x]=x$ for any number $x$.

James Chok
James Chok
Numerade Educator
01:16

Problem 3

Define a function product that produces the product of a list of numbers, and show using your definition that product $[2,3,4]=24$.

Melissa Barry
Melissa Barry
Numerade Educator

Problem 4

How should the definition of the function qsort be modified so that it produces a reverse sorted version of a list?

Check back soon!

Problem 5

What would be the effect of replacing $<=$ by $<$ in the original definition of qsort? Hint: consider the example qsort $[2,2,3,1,1]$.

Check back soon!