Re:Why did Prolog lose steam? (2010)
by ghusbands on Saturday April 22, 2023 @08:43AM
(#35666056)
I see your points - I'll certainly use clpfd more, in future.
Also, I was mistaken - my peano-ish solution worked in both directions, though it had probable performance issues (perhaps because I didn't know `dif/2` was more flexible than `\=`) and then had trouble when I tried to map back from peano to naturals. I used a fun and perhaps misleading form to try for brevity:
Also, I was mistaken - my peano-ish solution worked in both directions, though it had probable performance issues (perhaps because I didn't know `dif/2` was more flexible than `\=`) and then had trouble when I tried to map back from peano to naturals. I used a fun and perhaps misleading form to try for brevity:
And so: Edit: If one cared for safety/compatibility, each [1, X] would be [0+1, X].