https://github.com/ess/mfp
FP-style (but not really FP) stuff for Ruby
https://github.com/ess/mfp
Last synced: 11 months ago
JSON representation
FP-style (but not really FP) stuff for Ruby
- Host: GitHub
- URL: https://github.com/ess/mfp
- Owner: ess
- License: mit
- Created: 2018-09-08T20:13:34.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2018-09-11T21:32:01.000Z (over 7 years ago)
- Last Synced: 2025-02-22T21:42:12.512Z (over 1 year ago)
- Language: Ruby
- Size: 41 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# MFP #
The goal of the MFP (Minimally-Functional Programming) gem is to bring some of the goodness of [dry-rb](https://dry-rb.org) to older versions of Ruby. That being the case, dry-rb is a ***MUCH*** more thorough solution, and if you aren't constrained to incredibly outdated Ruby versions, I would implore you to use it instead of this.
## Installation ##
Add this line to your application's Gemfile:
```ruby
gem 'mfp'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install mfp
## Usage
MFP includes minimally-viable implementeations of the `Result` concept from more functional languages as well as a mechanism for doing [Railway Oriented Programming](https://fsharpforfunandprofit.com/rop/). These map to the same ideas as `Dry::Monads::Result` and `Dry::Transaction`, but are not really proper FP implementations.
### Result ###
### Railway Oriented Programming ##
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ess/mfp.
As this project uses [git-flow](https://nvie.com/posts/a-successful-git-branching-model/), please base any contributions you wish to make on the "develop" branch.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).