Skip to main content
Top

2021 | OriginalPaper | Chapter

10. Lists and Recursion

Authors : Donald Sannella, Michael Fourman, Haoran Peng, Philip Wadler

Published in: Introduction to Computation

Publisher: Springer International Publishing

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

Recall that the list notation [4,6,8] is just shorthand for the expression 4:(6:(8:[])). So, every list can be written using : and [] . In fact, every list can be written using : and [] in just one way. That fact is what makes pattern matching work on lists. Given a list l and a pattern p built using variables, [], : and literals, there is at most one way to match p against l. That match gives values to the variables in p. It might not match, if p requires a list that’s longer than l, or if p contains a literal that doesn’t match the value in the corresponding position in l.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Metadata
Title
Lists and Recursion
Authors
Donald Sannella
Michael Fourman
Haoran Peng
Philip Wadler
Copyright Year
2021
DOI
https://doi.org/10.1007/978-3-030-76908-6_10

Premium Partner