matilda-function 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/README.md +14 -2
- data/lib/{function.rb → matilda-function.rb} +0 -0
- data/matilda-function.gemspec +1 -1
- data/spec/function_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6a79b4ecbcd4f088bac6217cba4b662535206f9
|
4
|
+
data.tar.gz: e42e1c1880791e5f0cf156266bc5dab2e273d500
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 007cd8ba7d50caf4f984754611b3278f17d464278b21405f276d1bb14915f2e80903cf472173802678b4fca1f39e7fd33874ea9ad91e4f7ae3250e5c47f47b7e
|
7
|
+
data.tar.gz: e5e65c0c9d4e89d35d21a7de31896bd82270a9cf966a4a57af0b4120f0ab9e91ea7d3e1c146b57e645ddebdf54abb81baf26cb81b13d17d2a42107128c9695dd
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/seadowg/matilda-function.png?branch=master)](https://travis-ci.org/seadowg/matilda-function)
|
4
4
|
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'matilda-function'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
5
17
|
## Description
|
6
18
|
|
7
19
|
This library provides extensions to Ruby's Proc to allow for some functional goodness.
|
@@ -14,9 +26,9 @@ So we can pretend we are coding in Haskell we use the `<<` operator for composit
|
|
14
26
|
reverse = proc { |array| array.reverse }
|
15
27
|
reverese_order = sort << reverse
|
16
28
|
reverese_order.call [3,1,4,8] #=> [8,4,3,1]
|
17
|
-
|
29
|
+
|
18
30
|
When we combine two Procs using `<<` we create a new Proc that will first execute the receiver Proc and
|
19
|
-
then pass the result to the argument Proc. This provides an expressive and modular approach to creating complex
|
31
|
+
then pass the result to the argument Proc. This provides an expressive and modular approach to creating complex
|
20
32
|
high order functons in Ruby.
|
21
33
|
|
22
34
|
### Recursive
|
File without changes
|
data/matilda-function.gemspec
CHANGED
data/spec/function_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matilda-function
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Callum Stott
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -23,7 +23,7 @@ files:
|
|
23
23
|
- LICENSE.md
|
24
24
|
- README.md
|
25
25
|
- Rakefile
|
26
|
-
- lib/function.rb
|
26
|
+
- lib/matilda-function.rb
|
27
27
|
- matilda-function.gemspec
|
28
28
|
- spec/function_spec.rb
|
29
29
|
homepage:
|