Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up[Proposition] Add unfolds for types. #773
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
process-bot
Dec 4, 2016
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Dec 4, 2016
|
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
jvoigtlaender
Dec 4, 2016
Contributor
Please make such suggestions on the mailing list, not here. Also see what the links from process-bot have to say on this.
|
Please make such suggestions on the mailing list, not here. Also see what the links from process-bot have to say on this. |
jvoigtlaender
closed this
Dec 4, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Heimdell commentedDec 4, 2016
•
edited
Edited 1 time
-
Heimdell
edited Dec 4, 2016 (most recent)
I tried to code some isometric landscape generator (using svg) lately, and I got a task to solve: generate list of points
(Int, Int).The
core.Listmodule only containedList.range : Int -> Int -> List Intmethod. And nounfoldror alike.So I had to break my stream of thinking of things I want to do and implemented it myself.
My proposition: add
unfold{r,l,}for any module describing "sequental container" types likeList,Maybe, etc.For instance,
List.unfoldr : (seed -> Maybe (a, seed)) -> seed -> List a.