# `Feel.Analysis.Images.Range`
[🔗](https://github.com/FeeJai/BDM/blob/feel-v0.1.0/apps/feel/lib/feel/analysis/images/range.ex#L1)

The rules for the range functions (`Feel.Analysis.Images`, D-170; `Feel.Builtin.Range`): `after`, `before`, `coincides`,
`during`, `finished by`, `finishes`, `includes`, `meets`, `met by`, `overlaps`, `overlaps after`, `overlaps before`,
`started by` and `starts`.

They give `true` or `false`, and `null` for an argument that is out of the domain (D-79): `null`, a value that is neither a
point nor a range, a combination of the two that is not a signature (`meets(1, 2)`, `during([1..2], 3)`), a list that has not
exactly one item, and endpoints that cannot be compared with one another (a number and a string, a date and a date and time).
The signatures say `boolean | Null`, and so did the call of a name that is
never `null`. The rules say which of the three a call is.

Each argument is read by what it can be: a **point** of a kind (the kinds that have an order), a **range** with the kinds of
its endpoints, `null`, a list of one (its item, or `null` for a list of another length), a value of a type that is not known,
or something else. For each pair of those that the signatures take:

  * **Two points of one kind are compared.** `before` is `<`, `after` is `>` and `coincides` is `=` of the two, so the sets of
    the points decide: `before(a, b)` for an `a` in `[1..3]` and a `b` in `[5..9]` is `true`. The kinds of two points that
    are not one are `null`, and so is a pair of times, or of dates and times, which can differ in having a zone.
  * **A range is not looked into.** Its type has the kinds of its endpoints and not the endpoints, and it has the range with
    none (`(null..null)`, D-155) in every one, which is related to a point of any kind, so the result is a boolean: the sets
    do not say which. It can be `null` where an endpoint of one can be of a kind that cannot be compared with an endpoint of
    the other (the two ranges `range<number>` and `range<string>`, a point that is a date and a `range<date and time>`).

A call is never `null` for two arguments that cannot be, and `Null` is among the alternatives only if some arguments give it.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
