Closed UWN closed 1 year ago
You seem to attack too many items at once.
I'm doing whatever is more fun (I just wanted to see if functor_c/3
was possible), and whatever has the greatest impact (length_c/2
has already been useful in one of my programs to not only eliminate var/1
and (->)/2
that where needed to reorder predicates to make it work in many directions, but also increase performance).
I agree that I've been all over the place recently, but it has been a very fun journey.
Both of those queries now give more sensible answers:
?- length_c(L, N), L = N.
false.
?- L=[_|_], length_c(L,N).
L = [_C|_A], constrained:length_c(_A,_B), constrained:list_c(_A), clpz:(_B in 0..sup), clpz:(_B+1#=N), clpz:(N in 1..sup), constrained:integer_c(N).
I think this can already be closed, right?
(It seems you need a more principled approach. You seem to attack too many items at once.)