Skip to main content

Duality and De Morgan Principles for Lists

  • Chapter
Beauty Is Our Business

Part of the book series: Texts and Monographs in Computer Science ((MCS))

Abstract

Lists are the most important data type in functional programming. This is because they replace the use of iteration in imperative programming. For example, if we are asked to sum the values of f(i), for i ranging from 1 to 1000, a problem that the imperative programmer would be likely to solve by writing, say

$$ \begin{gathered} x\,: \equiv 0; \hfill \\ for\,i\,: \equiv \,1\,to\,1000 \hfill \\ do\,x\,: \equiv \,x\, + \,f\left( i \right); \hfill \\ \end{gathered} $$

the functional programmer would probably write something like

$$sum\left( {map\,f[1..1000]} \right)$$

and we see that the sequence of values assumed over time by i and x, respectively, in the imperative program are each now represented by a list.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 219.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. R. S. Bird. Algebraic identities for program calculation. Computer Journal, 32 (2), April 1989.

    Google Scholar 

  2. R. S. Bird and P. L. Wadler. Introduction to Functional Programming. Prentice Hall International, 1988.

    Google Scholar 

  3. D. A. Turner. Miranda: a non-strict functional language with polymorphic types. In Proceedings IFIP Conference on Functional Languages and Computer Architecture, Nancy, France, pages 1–16, Springer-Verlag, September 1985. Lecture Notes in Computer Science, Vol. 201.

    Google Scholar 

  4. D. A. Turner. SASL Language Manual. Technical Report, University of Kent. Last revised August 1983.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1990 Springer-Verlag New York, Inc.

About this chapter

Cite this chapter

Turner, D.A. (1990). Duality and De Morgan Principles for Lists. In: Feijen, W.H.J., van Gasteren, A.J.M., Gries, D., Misra, J. (eds) Beauty Is Our Business. Texts and Monographs in Computer Science. Springer, New York, NY. https://doi.org/10.1007/978-1-4612-4476-9_48

Download citation

  • DOI: https://doi.org/10.1007/978-1-4612-4476-9_48

  • Publisher Name: Springer, New York, NY

  • Print ISBN: 978-1-4612-8792-6

  • Online ISBN: 978-1-4612-4476-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics