Hubbry Logo
search
logo
SETL
SETL
current hub

SETL

logo
Community Hub0 Subscribers
Write something...
Be the first to start a discussion here.
Be the first to start a discussion here.
See all
SETL

SETL (SET Language) is a very high-level programming language based on the mathematical theory of sets. It was originally developed at the New York University (NYU) Courant Institute of Mathematical Sciences in the late 1960s, by a group including (Jack) Jacob T. Schwartz, R.B.K. Dewar, and E. Schonberg. Schwartz is credited with designing the language.

SETL provides two basic aggregate data types: (unordered) sets, and tuples. The elements of sets and tuples can be of any arbitrary type, including sets and tuples themselves, except the undefined value om (sometimes capitalized: OM). Maps are provided as sets of pairs (i.e., tuples of length 2) and can have arbitrary domain and range types. Primitive operations in SETL include set membership, union, intersection, and power set construction, among others.

SETL provides quantified boolean expressions constructed using the universal and existential quantifiers of first-order predicate logic.

SETL provides several iterators to produce a variety of loops over aggregate data structures.

Print all prime numbers from 2 to N:

The notation is similar to list comprehension.

A factorial procedure definition:

A more conventional SETL expression for factorial (n > 0):

See all
User Avatar
No comments yet.