Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Roadmap #17

Open
1 of 8 tasks
jdantonio opened this issue Aug 17, 2014 · 11 comments
Open
1 of 8 tasks

Roadmap #17

jdantonio opened this issue Aug 17, 2014 · 11 comments

Comments

@jdantonio
Copy link
Owner

I started this gem just for fun; a way to experiment with functional programming ideas in Ruby. I don't really have a long-term plan or a very clear roadmap. Below is a list of features I would like to add as I find the time to work on them, but I (currently) am making no promises regarding if/when I will work on any of them.

I welcome any and all input from anyone actively using this gem. If you find this gem useful and have ideas for how it can grow and evolve I would love your feedback.

To-do

  • Declare Record classes with datatypes for all members (similar to PureScript)
  • Pure functional data structures based on finger trees
    • sequence
    • priority queue
    • search tree
    • priority search queue
  • Monoid
  • Pattern matching within if/elsif/else and case statements (based on Erlang and PureScript)
  • [ ] Support for RubyMotion
    • [ ] iOS
    • [ ] Android (once RubyMotion 3.0 is released)
@rranelli
Copy link
Contributor

Hi,

Any interest in adding currying ?

I have scratched the idea for a blog post, maybe I could help ; )

Thanks.

@jdantonio
Copy link
Owner Author

@rranelli Certainly, currying would be a great addition. Thank you! Have you already written the blog post? I'd love to read it.

@rranelli
Copy link
Contributor

Ow, the post is still a /core-dump/ of ideas. I will probably finish it this week.
My English is pretty poor so I tend to keep the posts way too long in the oven.

I'll let you know as soon as it becomes readable.

I'll get a proposal for currying them ;).

Thanks for attention!

@rranelli
Copy link
Contributor

rranelli commented Mar 2, 2015

I was surprised to learn just now that Proc#curry actually exists!

We could return a curryied version of a method with something like

def as_curry(name)
  method(name).to_proc.curry
end

Not sure how I would currify something like Array#map though. In functional languages the function to map over would be an actual argument, not a block.

@jdantonio
Copy link
Owner Author

I wasn't aware that Ruby supported currying. Nice find!

@rranelli
Copy link
Contributor

rranelli commented Mar 5, 2015

The behavior is also kinda weird.

add = (->(x,y) {x+y}).curry
add.().().().().(1).().(2) # => 3

For better or worse, ruby never ceases to amaze me.

@jdantonio
Copy link
Owner Author

@cvb I see that you created a v1.3.0 tag, but the version file still says 1.2.0 and that's the last version uploaded to Rubygems. Had you intended to release 1.3.0?

@cvb
Copy link
Collaborator

cvb commented Sep 29, 2015

@jdantonio sorry, forgot that, think I also need to update changelog

and about rubygems, I don't know if I can do that, will try later

@jdantonio
Copy link
Owner Author

@cvb I can push to Rubygems when the release is ready. If you don't mind, please remove the 1.3.0 tag and create tag master again once you've updated the version file and the changelog. Normally I create a release within GitHub and upload the packaged ".gem" file before pushing to Rubygems. I can do the build if you like, but you are welcome to package the build yourself if you would prefer. There is a rake task for that. I can push the build to Rubygems once it's created.

@cvb
Copy link
Collaborator

cvb commented Oct 4, 2015

@jdantonio ok, I updated and uploaded everything, I think you can upload it to rubygems now

@jdantonio
Copy link
Owner Author

I've published it to Rubygems. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants