Skip to content

Commit

Permalink
corner cases in new, refs #3
Browse files Browse the repository at this point in the history
  • Loading branch information
mlliarm committed Nov 9, 2020
1 parent cba773c commit bd2ed46
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions interval_arithmetic.lgt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
implements(interval_arithmeticp)).

new(Start, End, Interval) :-
Start \= End,
Interval = [Start, End].

new(Start, End, Interval) :-
Start < End,
Interval = [Start, End].

is_in([Xa, Xb], Number) :-
Xa =< Number,
Xb >= Number.
Expand Down

0 comments on commit bd2ed46

Please sign in to comment.