Pair
is a tuple of length 2.
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.
reverse
defn
(Fn [(Ref (Pair a b) c)] (Pair b a))
(reverse t)
reverses a Pair
by reversing its member positions.
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
.