@@ -300,6 +300,27 @@ impl<Tuple: Ord> Variable<Tuple> {
300
300
/// The main limitation is that the things being combined must
301
301
/// consist of one dynamic variable (`source`) and then several
302
302
/// fixed relations (`leapers`).
303
+ ///
304
+ /// The idea is as follows:
305
+ ///
306
+ /// - You will be inserting new tuples that result from joining (and anti-joining)
307
+ /// some dynamic variable `source` of source tuples (`SourceTuple`)
308
+ /// with some set of values (of type `Val`).
309
+ /// - You provide these values by combining `source` with a set of leapers
310
+ /// `leapers`, each of which is derived from a fixed relation. You can create
311
+ /// a leaper in one of two ways:
312
+ /// - Extension: In this case, you have a relation of type `(K, Val)` for some
313
+ /// type `K`. You provide a closure that maps from `SourceTuple` to the key
314
+ /// `K`. If you use `relation.extend_with`, then any `Val` values the
315
+ /// relation provides will be added to the set of values; if you use
316
+ /// `extend_anti`, then the `Val` values will be removed.
317
+ /// - Filtering: In this case, you have a relation of type `K` for some
318
+ /// type `K` and you provide a closure that maps from `SourceTuple` to
319
+ /// the key `K`. Filters don't provide values but they remove source
320
+ /// tuples.
321
+ /// - Finally, you get a callback `logic` that accepts each `(SourceTuple, Val)`
322
+ /// that was successfully joined (and not filtered) and which maps to the
323
+ /// type of this variable.
303
324
pub fn from_leapjoin < ' a , SourceTuple : Ord , Val : Ord + ' a > (
304
325
& self ,
305
326
source : & Variable < SourceTuple > ,
0 commit comments