re: issue #118
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "scryer-prolog"
|
name = "scryer-prolog"
|
||||||
version = "0.8.64"
|
version = "0.8.65"
|
||||||
authors = ["Mark Thom <markjordanthom@gmail.com>"]
|
authors = ["Mark Thom <markjordanthom@gmail.com>"]
|
||||||
repository = "https://github.com/mthom/scryer-prolog"
|
repository = "https://github.com/mthom/scryer-prolog"
|
||||||
description = "A modern Prolog implementation written mostly in Rust."
|
description = "A modern Prolog implementation written mostly in Rust."
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ length(Xs, N) :-
|
|||||||
N >= 0, !,
|
N >= 0, !,
|
||||||
'$skip_max_list'(M, N, Xs, Xs0),
|
'$skip_max_list'(M, N, Xs, Xs0),
|
||||||
( Xs0 == [] -> N = M
|
( Xs0 == [] -> N = M
|
||||||
; var(Xs0) -> R is N-M, nl, length_rundown(Xs0, R)).
|
; var(Xs0) -> R is N-M, length_rundown(Xs0, R)).
|
||||||
length(_, N) :-
|
length(_, N) :-
|
||||||
integer(N), !,
|
integer(N), !,
|
||||||
throw(error(domain_error(not_less_than_zero, N), length/2)).
|
throw(error(domain_error(not_less_than_zero, N), length/2)).
|
||||||
|
|||||||
Reference in New Issue
Block a user