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
Use existing types as base functors when possible #81
Comments
I don't yet have a concrete proposal, this was just to give a flavour for the kind of API I had in mind. Nevertheless, here is what
|
What type `distPara` would have.
It looks like introducing names would just obscure types (one have to lookup that `ParaSubTree` is just a pair).
…Sent from my iPhone
On 2 Feb 2019, at 21.56, Samuel Gélineau ***@***.***> wrote:
how splitAtCommaSpace in #74 would look like with it?
I don't yet have a concrete proposal, this was just to give a flavour for the kind of API I had in mind. Nevertheless, here is what splitAtCommaSpace would look like with ParaSubTree.
-- |
-- >>> splitAtCommaSpace "one, two, three"
-- Just ("one","two, three")
splitAtCommaSpace :: String -> Maybe (String,String)
splitAtCommaSpace = para splitAtCommaSpaceF
splitAtCommaSpaceF :: ListF Char (ParaSubTree String (Maybe (String,String)))
-> Maybe (String,String)
splitAtCommaSpaceF (Cons ',' (originalSubTree -> ' ':ys)) = Just ([], ys)
splitAtCommaSpaceF (Cons x (recursiveResult -> Just (xs,ys))) = Just (x:xs, ys)
splitAtCommaSpaceF _ = Nothing
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I feel like the When combining recursion-schemes using Similarly, when combining recursion-schemes for unfolds, we end up with a lot of different monadic actions we can perform. For example, in Does that sound like a laudable goal? |
Part of the Merge yaya into recursion-schemes? thread. Here are the comments from that thread which pertain to the topic.
In the yaya documentation, @sellout says that one advantage of
yaya
overrecursion-schemes
is that in yaya:@gelisam responds:
@phadej responds:
The text was updated successfully, but these errors were encountered: