GoConqr has a new look! Let us know what you think.

Flashcards

Sequences

Carl Patchett Computing Science and Mathematics English 8 cards

Cards in this deck (8)

  1. 1What is a Sequence?A Sequence is a collection of objects, where the objects are in a prescribed order and the same object can occur more than once.
  2. 2How are Sequences denoted?Sequences are denoted using the brackets < >.
    E.G
    < 1, 2, 3 >
  3. 3What are the operations used on Sequences?The operations used on Sequences are 'len', 'head', 'tail' and 'concatenation'.
  4. 4What is the 'len' operator?The 'len' operator returns the length of the Sequence.
    E.G
    len S = 0 if S = <>
    len S = 1 if S =
  5. 5What is the 'head' operator?The 'head' operator requires a NON-EMPTY Sequence, and returns the first element.
    E.G
    head S = S[1]
  6. 6What is the 'tail' operator?The 'tail' operator requires a NON-EMPTY Sequence, and returns the Sequence obtained by removing the first element.
    E.G
    tail S = < > if S has length 1
  7. 7What is the 'concatenation' operator?The 'concatenation' operator requires two Sequences, where the first sequence is followed by the elements of the second sequence IN ORDER.
  8. 8—

Information

Description
Flash Cards for Sequences
Created by
Carl Patchett
Views
24
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?