feature: Range builtin
The range built-in can offer a comfortable way to generate facts.
It should process 3 arguments min, max, step_size
For example:
A(range(1, 5, 0.5)).
B(range(1, 5, 0.5), range(1, 5, 1)).
So far, we only discussed that a built-in body predicate would be nice for this, as in
A(?X) :- IN_RANGE(?X,1,5,0.5) .
B(?X,?Y) :- IN_RANGE(?X,1,5,0.5), IN_RANGE(?Y,1,5,1) .
Whether syntactic sugar for this should be added and how this should look remains unclear. The original proposal would introduce a "special" fact format that cannot be interpreted according to the normal rules. It would be a bit like an inverse aggregation, where one fact-like statement expands into many facts. In this situation range would not be a built-in function, but rather the whole special format of range inside facts would get a different meaning from the usual "fact with a computed value of a function in some of its parameters".