Pair

is a tuple of length 2.

<

defn

(Fn [(Pair a b), (Pair a b)] Bool)

                        (< t1 t2)
                    

=

defn

(Fn [(Ref (Pair a b) c), (Ref (Pair a b) c)] Bool)

                        (= o1 o2)
                    

>

defn

(Fn [(Pair a b), (Pair a b)] Bool)

                        (> t1 t2)
                    

a

instantiate

(Fn [(Ref (Pair a b) c)] (Ref a c))

gets the a property of a Pair.

b

instantiate

(Fn [(Ref (Pair a b) c)] (Ref b c))

gets the b property of a Pair.

copy

template

(Fn [(Ref (Pair a b) c)] (Pair a b))

copies a Pair.

delete

template

(Fn [(Pair a b)] ())

deletes a Pair. Should usually not be called manually.

hash

defn

(Fn [(Ref (Pair a b) c)] Int)

                        (hash pair)
                    

init

template

(Fn [a, b] (Pair a b))

creates a Pair.

init-from-refs

defn

(Fn [(Ref a b), (Ref c d)] (Pair a c))

                        (init-from-refs a-val b-val)
                    

initializes a Pair from member references.

prn

template

(Fn [(Ref (Pair a b) c)] String)

converts a Pair to a string.

reverse

defn

(Fn [(Ref (Pair a b) c)] (Pair b a))

                        (reverse t)
                    

reverses a Pair by reversing its member positions.

set-a

template

(Fn [(Pair a b), a] (Pair a b))

sets the a property of a Pair.

set-a!

template

(Fn [(Ref (Pair a b) c), a] ())

sets the a property of a Pair in place.

set-b

template

(Fn [(Pair a b), b] (Pair a b))

sets the b property of a Pair.

set-b!

template

(Fn [(Ref (Pair a b) c), b] ())

sets the b property of a Pair in place.

str

template

(Fn [(Ref (Pair a b) c)] String)

converts a Pair to a string.

update-a

instantiate

(Fn [(Pair a b), (Ref (Fn [a] a c) d)] (Pair a b))

updates the a property of a (Pair a b) using a function f.

update-b

instantiate

(Fn [(Pair a b), (Ref (Fn [b] b c) d)] (Pair a b))

updates the b property of a (Pair a b) using a function f.

zero

defn

(Fn [] (Pair a b))

                        (zero)