![]() If we write Tail = then we can also write the list L as L =. ![]() Now, let us consider we have a list, L =. The remaining part of the list, called the tail. The first item, called the head of the list In the second case, the list consists of two things as given below − In the first case, the list is simply written as a Prolog atom. The list of elements will be enclosed with square brackets.Ī list can be either empty or non-empty. List consists of any number of items, for example, red, green, blue, white, dark. The list is a simple data structure that is widely used in non-numeric programming. Set operations like set union, set intersection, etc. Repositioning operators such as permutation, combination, etc. In the subsequent sections, we will discuss the following topics −īasic operations on prolog such as Insert, delete, update, append. Lists are used to store the atoms as a collection. It is a data structure that can be used in different cases for non-numeric programming. In this chapter, we will discuss one of the important concepts in Prolog, The Lists.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |