ever seen Friedman and Byrd talk about kanren ?
? evalo(e, 6)
(+ 3 3)I have seen a few *kanren posts now on HN, and they always have their operators ending in "o".
Is that just to distinguish them from normal "eval" (in this case), or is there a deeper meaning?
I think it's yet another typographic ~wonder. From what I recall it's a ° to denote relation (relat°) but made into an ascii 'o'.
So yeah, it's just to distinguish from the usual semantics.
I've been teaching myself Prolog, and it's sufficiently different that I feel like I'm learning to program all over again. You can sort of pretend that predicates are just funny functions, where you have to put the return value's container into the argument list, but that's not really what's going on. I loved reading the docs for SWI-Prolog, where most of the predicate docstrings start: "True if...". You can say that the length predicate returns the length of a list, but really it returns true if the given list has a length equal to the given integer. It will tell you the length of a list, sure, but it will also do the reverse:
?- length(List, 5) -> List = [_,_,_,_,_]
Nuts!