View Source Interval.Endpoint (Interval v0.1.2)
An endpoint in an Interval
.
An Endpoint represents the left- or right-most point of an interval.
Link to this section Summary
Link to this section Types
Link to this section Functions
Create a new exclusive Endpoint.
Create a new inclusive Endpoint.
Create a new Endpoint
examples
Examples
iex> new(1, :inclusive)
%Endpoint{point: 1, inclusive: true}
iex> new(:an_atom, :inclusive)
** (RuntimeError) No Interval.Point protocol implementation for :an_atom