Skip to main content

ListBeginsWithList

Type

operator

Summary

Determines whether Source begins with Prefix

Syntax

<Source> begins with <Prefix>

Description

Source begins with Prefix if and only if the elements of Prefix occur as an initial subsequence of the elements of Source.

note

Since the empty list is an initial subsequence of every list, every list begins with the empty list.

Parameters

NameTypeDescription

Prefix

An expression which evaluates to a list.

Source

An expression which evaluates to a list.

Examples

variable tVar as List
put [1, 2, 3, 4, 5] into tVar

variable tBegins as Boolean
// put tList begins with tList[1] into tBegins -- error: tList[1] is not a list

put tList begins with [1, 2] into tBegins -- tBegins is true
Thank you for your feedback!

Was this page helpful?