brandonwillard / loghyc

Loghyc - a miniKanren implementation in Hy
89 stars 3 forks source link

Fix results of __iter__ for ConsPair #15

Closed brandonwillard closed 6 years ago

brandonwillard commented 6 years ago

The expression (list (ConsPair 'car 'cdr)) was producing [HySymbol("car"), "c", "d", "r"], i.e. mistakenly iterating over the elements in the string "cdr". This commit fixes that and now yields [HySymbol("car")].

Also, the assert statements were changed to considerably more informative ones, and there's a minor change/update to one of the docstrings.