Sha256: 2cf9f4ce08042112d52655cacda3b1057a557587dd44fdb1eb62e64840584464
Contents?: true
Size: 757 Bytes
Versions: 2
Compression:
Stored size: 757 Bytes
Contents
# Function::Composite This gem provides a syntax sugar for `Symbol` with `Proc#<<` and `Proc#>>`. ## Installation Add this line to your application's Gemfile: ```ruby gem 'function-composite' ``` And then execute: $ bundle Or install it yourself as: $ gem install function-composite ## Usage ```ruby require 'function-composite' using Function::Composite p %w{72 101 108 108 111}.map(&:to_i >> :chr) #=> ["H", "e", "l", "l", "o"] p %w{72 101 108 108 111}.map(&proc { |s| s.to_i } >> :chr) #=> ["H", "e", "l", "l", "o"] h = { Alice: 30, Bob: 60, Cris: 90 } p %w{Alice Bob Cris}.map(&(:to_sym >> h)) #=> [30, 60, 90] ``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/nobu/function-composite.
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
function-composite-0.1.1 | README.md |
function-composite-0.1.0 | README.md |