core-logic

Benjamin 2022-12-22T08:41:23.719039Z

If you model day21 of advent of code with core.logic how do you do that? Is every monkey an lvar? And how do I say arithmetic relationships? In the puzzle I have a list of monkeys that have either a number as value, or a +/-/*// relation of 2 other monkeys

Ben Sless 2022-12-22T08:50:34.328689Z

You can use the fd namespace (finite domain) Check the Sudoku example for core.logic

Benjamin 2022-12-22T12:00:11.699739Z

checking

Benjamin 2022-12-22T12:50:15.624469Z

hehehe https://github.com/benjamin-asdf/advent-of-code/blob/master/src/Y2022/day21_logic.clj might be I'm doing some blunder, first code but works