-
Notifications
You must be signed in to change notification settings - Fork 20
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
write a small but interesting self-contained example with simple monad #6
Comments
Even a nice example just showing its use to some remote APIs would be nice! |
first nontrivial example is in scala-gopher:https://github.com/rssh/scala-gopher/blob/master/shared/src/test/scala/gopher/monads/Queens.scala |
I am interesting in this project please assign me task |
hey @rssh , The code works by recursively exploring all possible subsets of a given set and checking if any of them add up to a given sum. If a subset is found that adds up to the sum, the function returns Success with the subset as a List[List[Int]]. If no subset is found, the function returns Success with an empty List[List[Int]]. If there is an error, the function returns Failure with an error message. |
@samadpls But how is this related to the dotty-cps-async project? |
use as monad Try[List[_]] (or just List) and implement some exploring space algorithms, such as 8 eight queens puzzle, or knight tour in the monad, to have an example, which will not compile, but will eventually be compiled after we will add more construct. This will make the game of enumerating all possible scala syntax trees not such boring ;)
Now - all language construct are implemented, so. task can be reformulated as: define CpsAsyncMonad for Try[List[_]] (or use existing CpsMonad for List). to write some space exploration algorithm in direct style.
The text was updated successfully, but these errors were encountered: