Re:TDD from the Factorio Team
by victorNicollet on Friday June 18, 2021 @11:32AM
(#27551416)
Let's say we work on the "reverse list" function. A few tests I could write are that the following clauses are true:
And maybe also that the following clauses are false:
Is Prolog able to infer, from the above, that rev([4, 5], [5, 4]) ? Or to synthesize the general form rev([H|T],R) :- rev(T, RT), concat(RT,[H],R) ?
[ Parent
| on HN ]