**SETL** is a very high level programming language based on the mathematical theory of sets . It was originally developed by Jacob T. Schwartz (en) at the Current Institute of Mathematical Sciences of NYU . There is a variant called *ISETL* ( *Interactive SET Language* ) for programming on mathematical sets .

SETL provides two basic data types: The *unordered sets* and *suites* (also called *tuples* ). The elements of the sets and tuples can be of any arbitrary type, including the sets and the tuples themselves. The *functions* are provided as sets of *pairs* (ie d., Tuples of length 2) and can have fields and codomains arbitrary kinds. The primitive operations in SETL include, among others, ensemblistic belonging, union, intersection, and the power of sets. SETL is used to express quantized Boolean expressions constructed using the computation of first order predicates , Universal quantifiers and existential quantifiers . SETL also provides several iterators to produce various loops on data structures.

## Sample Code

Return all prime numbers less than n:

NbPremiers: = func (n); Return {x: x in {2..n} | Forall y in {2..x-1} | X mod y / = 0}; End; NbPremiers (100);

The notation is similar to list understanding .

## History

ABC , the precursor to Python , was inspired by SETL to Lambert Meertens (en) , who spent a year with the group SETL at NYU before offering the final version of ABC.

## Bibliography

- Jacob T. Schwartz,
*Set Theory as a Language for Program Specification and Programming*. Current Institute of Mathematical Sciences, New York University, 1970. - Jacob T. Schwartz,
*On Programming, An Interim Report on the SETL Project*, Computer Science Department, Current Institute of Mathematical Sciences, New York University (1973). - Jacob T. Schwartz, RBK Dewar, E. Dubinsky, E. Schonberg,
*Programming With Sets: An Introduction to SETL*, 1986 ( ISBN 0-387-96399-5 )