core-logic

niveauverleih 2020-03-11T13:31:11.006700Z

In the reasoned Schemer and core logic primer succeed and fail are called constants, whereas the source code defines them as functions. I'm confused.

2020-03-11T15:40:42.008300Z

They are goals that don't depend on any passed in values, so constant in that sense

2020-03-11T16:39:58.008500Z

@nick.romer all goals are functions iirc

2020-03-11T16:43:09.009900Z

You just use them as if they were constants at the minikanren/core.logic language level; but underneath they’re implemented as functions.

2020-03-11T16:43:47.010400Z

internally core logic will apply values to them as with any other goal. They’ll just always succeed or fail.

niveauverleih 2020-03-11T17:41:27.011200Z

I see. Thank you both!