-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
abstract "[state]" to "t state" #16
Comments
I'm not opposed to this, but I don't have the time to implement it at the moment. I'd happily accept a PR, otherwise I will give it a shot when I have a chance. My preference would be to abstract it to My concerns are:
|
a Foldable instance definitely makes sense on the consumer side, whereas library-wise we'd need to somehow abstract over cons'ing path elements - i dont think Foldable has functions for this - maybe a I see there's a benchmarking test-bed so that will be helpful. Having written the issue i noticed a common pattern to skip reversing the found path is to simply swap the goal-state with the initial-state. I'm considering writing a PR once my semester gets less cluttered, should be around february. :) |
Sounds good! Let me know if you start working on it, so that we don't duplicate our work. |
Hello thanks for this library :)
Do you think we could somehow abstract the
[state]
type for result paths?If I'm not mistaken it could be a Monoid, Foldable instance, or possibly a custom Path typeclass with a predefined instance for
[]
.I'm thinking it might be helpful if the found path is to be reversed after it was found (and therefore couldve been constructed in a different order using for example :<| :|> from Data.Sequence), or within a monadic context some specialized type other than
[state]
.search-algorithms/src/Algorithm/Search.hs
Line 601 in 8defc3f
The text was updated successfully, but these errors were encountered: