totally_lazy 0.1.55 → 0.1.56

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/readme.md +19 -11
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGFjNjY5NzI0NjAzMDgyZThjYTA3MTUxYWI0YTBiNzk0ZmZkMDA5ZQ==
4
+ MmQyN2I0MzM0NzY5NjEyZGM4NDJmMzAwNzMwY2JiZjM2ZGY5ZThmOQ==
5
5
  data.tar.gz: !binary |-
6
- YmU1MjQ0YzVmOThmMjYzMTVlODlmODY3Yzc4OWE0OWUxMzc5YTI0Mg==
6
+ NDFhNDU0YzYxNjcwMjdlNmZmZjhlZTllYTIzNTAyMzZmMDMyYmZkZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- M2ZiYzJjOTZlNjZlN2Y5NmJkNDM5ZmNmYTY1MThiODQyYzgyNGU0OTkwOWJk
10
- ODk3ZjhmNDJjNGVhZmZhYTRmNGMzMjQyMjJmYjdmYzI2MDAyNTIyYzdkOTRi
11
- MTU1ZWIxYmUxYjQwZmEzZTlmOTE2YTkyNjRjMjNkNzhkNDliNmE=
9
+ ZGY0ZDg4NTE0M2Q5YmM0YmJlM2I1N2YxNmIxNzJiMTRmOTE2YjViMmRjMzc2
10
+ NjMxYmFmMWUwYmViNTllMTIzMWM2ZGFjYjU5NzI2YjYxZGIyNTI3OWJjMjMz
11
+ YjRmMGE5NDhlODg2ZTVlMDdjYTk1OTgyOGMyOTEwMzQyNzE1NGY=
12
12
  data.tar.gz: !binary |-
13
- YTNkYWNmODE3OTVjY2QzZWRmM2UyMWFmZDZlODM4N2M4OTY3MTk1MTJkMDI0
14
- ZGFhOTAxZDRjZDdiYzg5MTc3MDdmZDZkMDViOWZiNjY1ZDhhYTMwZDA3YTVk
15
- OGNmNjhjMTZkYjA2ZjAzMWU1YmFjMmVkY2RhNGNmYTFhMDA1OTM=
13
+ NjkxMTNhMDlmMWNmZjI5MmNkODE3YjY0YWM1ZmRmYmFlNzE0YWM1MzYyM2Yx
14
+ Y2M1ZDYwYmQzZDE5NGQ0MTE2YzliYWI3YzBlYWU5YmQxNTg5OTRhYjVkYzQz
15
+ NDZlZGVhMGFkOGI3MjcwNzViMmRhOGRkYWI3NGMyMjNiMjRkY2Y=
data/readme.md CHANGED
@@ -36,15 +36,23 @@ The following are some simple examples of the currently implemented functionalit
36
36
  ```ruby
37
37
  require 'totally_lazy'
38
38
 
39
- sequence(1,2,3,4).filter(even) # lazily returns 2,4
40
- sequence(1,2).map(to_string) # lazily returns "1","2"
41
- sequence(1, 2).map_concurrently(to_string) # lazily distributes the work to background threads
42
- sequence(1,2,3).take(2) # lazily returns 1,2
43
- sequence(1,2,3).drop(2) # lazily returns 3
44
- sequence(1,2,3).tail # lazily returns 2,3
45
- sequence(1,2,3).head # eagerly returns 1
46
- sequence(1,2,3).head_option # eagerly returns an option
47
- some(sequence(1,2,3)).get_or_else(empty) # eagerly returns value or else empty sequence
48
- sequence(1, 2, 3, 4, 5).filter(greater_than(2).and(odd)) # lazily returns 3,5
49
- sequence(pair(1, 2), pair(3, 4)).filter(where(first, equal_to?(3))) # lazily returns pair(3,4)
39
+ sequence(1, 2, 3, 4).filter(even) # lazily returns 2,4
40
+ sequence(1, 3, 5).find(even) # eagerly returns none()
41
+ sequence(1, 2, 3).contains?(2) # eagerly returns true
42
+ sequence(1, 2, 3).exists?(even) # eagerly return true
43
+ sequence(1, 2).map(to_string) # lazily returns "1","2"
44
+ sequence(1, 2).map_concurrently(to_string) # lazily distributes the work to background threads
45
+ sequence(1, 2, 3).take(2) # lazily returns 1,2
46
+ sequence(1, 2, 3).drop(2) # lazily returns 3
47
+ sequence(1, 2, 3).tail # lazily returns 2,3
48
+ sequence(1, 2, 3).head # eagerly returns 1
49
+ sequence(1, 2, 3).reduce(sum) # eagerly return 6
50
+ sequence(1, 2, 3).for_all(odd) # eagerly returns false;
51
+ sequence(1, 2, 3).fold_left(0, add) # eagerly returns 6
52
+ some(sequence(1, 2, 3)).get_or_else(empty) # eagerly returns value or else empty sequence
53
+ sequence(1, 2, 3, 4, 5).filter(greater_than(2).and(odd))
54
+ # lazily returns 3,5
55
+ sequence(pair(1, 2), pair(3, 4)).filter(where(first, equal_to?(3)))
56
+ # lazily returns pair(3,4)
57
+ sequence(1, 2, 3).to_s # eagerly returns "[1,2,3]"
50
58
  ```
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: totally_lazy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.55
4
+ version: 0.1.56
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raymond Barlow