You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 18, 2019. It is now read-only.
Free variables in the query as returned by find-free-vars is currently a regular set. It should be a set (because if a free variable occurs n > 1 times in an expression it is still a single free variable), but it should be an ordered set because we're splicing it into fresh so you need to know the order in order to know what your results mean.
Since we don't touch the set once we created it, this may not be a problem since (seq free-vars) will always return a consistent value. However, having an ordered set would be nice because that makes that requirement explicit. Secondly, that would mean that (ideally) variables are returned in the order they appear in the query, which is nice.
Unfortunately it appears ordered types are only available externally (e.g. flatland/ordered) and not in the stdlib. This is problematic because it appears that library is not available for ClojureScript. Perhaps an acceptable return value for find-free-vars would even be an arbitrary seq; just with duplicate values removed; in which case we can just use distinct.
The text was updated successfully, but these errors were encountered:
Free variables in the query as returned by find-free-vars is currently a regular set. It should be a set (because if a free variable occurs n > 1 times in an expression it is still a single free variable), but it should be an ordered set because we're splicing it into
fresh
so you need to know the order in order to know what your results mean.Since we don't touch the set once we created it, this may not be a problem since
(seq free-vars)
will always return a consistent value. However, having an ordered set would be nice because that makes that requirement explicit. Secondly, that would mean that (ideally) variables are returned in the order they appear in the query, which is nice.Unfortunately it appears ordered types are only available externally (e.g. flatland/ordered) and not in the stdlib. This is problematic because it appears that library is not available for ClojureScript. Perhaps an acceptable return value for
find-free-vars
would even be an arbitrary seq; just with duplicate values removed; in which case we can just usedistinct
.The text was updated successfully, but these errors were encountered: