qtil
advanced-security/qtil-swift 0.0.3
Search

Module Tuple5

A module that provides a tuple of values of type A, B, and C.

In qtil parlance, a “Tuple” has three or more types/values, constrained by some predicate, a “Pair” is a specific set of two types, A and B, constrained by some predicate, and a “Product” is the combination of types/values which are not constrained by a predicate.

To use this module, write a predicate that holds for the types you want to constrain, and instantiate the relevantly sized like so:

import qtil.tuple.Tuple

predicate myPredicate(int a, string b, Char c) {
  a = [0..10] and b = a.toString() and c.isStr(b)
}

class Tuple = Tuple3<int, string, Char, myPredicate>::Tuple;

Each tuple type exposes the getFirst(), getSecond(), getThird() member predicates, which retrieves the first and second and third values of the tuple, respectively.

Import path

import qtil.tuple.Tuple

Classes

Parameters