[package] [Java implementation] [Execution output]


Collections


/**
 * If defined, empty_set is a per-type constant specifying an instance of type C that represents the empty set.
 * Note that maps may be considered to be sets of entries and so may elect to define this constant as well.
 * The Church parser maps the {} syntactic form (opening and closing curly braces separated only by whitespace)
 * to 'empty_set'.
 */
abstract <C> C: empty_set;

/**
 * For a collection 'a', "size(a)" or "a.size" returns an integer denoting the length or size of the collection.
 * Here, a collection can be a native Java array, an instance of java.util.Collection, a java.lang.String, or
 * an instance of any other type that can meaningfully define a size property.
 */
abstract <C> int: (C: a).size;