dry-monads 1.3.2 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +157 -73
  3. data/LICENSE +1 -1
  4. data/README.md +18 -38
  5. data/dry-monads.gemspec +32 -30
  6. data/lib/dry-monads.rb +3 -1
  7. data/lib/dry/monads.rb +4 -2
  8. data/lib/dry/monads/all.rb +4 -2
  9. data/lib/dry/monads/constants.rb +1 -1
  10. data/lib/dry/monads/conversion_stubs.rb +2 -0
  11. data/lib/dry/monads/curry.rb +2 -0
  12. data/lib/dry/monads/do.rb +55 -17
  13. data/lib/dry/monads/do/all.rb +39 -17
  14. data/lib/dry/monads/do/mixin.rb +2 -0
  15. data/lib/dry/monads/either.rb +9 -7
  16. data/lib/dry/monads/errors.rb +8 -3
  17. data/lib/dry/monads/lazy.rb +19 -6
  18. data/lib/dry/monads/list.rb +31 -30
  19. data/lib/dry/monads/maybe.rb +90 -19
  20. data/lib/dry/monads/registry.rb +15 -12
  21. data/lib/dry/monads/result.rb +42 -15
  22. data/lib/dry/monads/result/fixed.rb +35 -24
  23. data/lib/dry/monads/right_biased.rb +45 -24
  24. data/lib/dry/monads/task.rb +25 -22
  25. data/lib/dry/monads/transformer.rb +4 -1
  26. data/lib/dry/monads/traverse.rb +9 -1
  27. data/lib/dry/monads/try.rb +51 -13
  28. data/lib/dry/monads/unit.rb +6 -2
  29. data/lib/dry/monads/validated.rb +27 -20
  30. data/lib/dry/monads/version.rb +3 -1
  31. data/lib/json/add/dry/monads/maybe.rb +4 -3
  32. metadata +27 -75
  33. data/.codeclimate.yml +0 -12
  34. data/.github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md +0 -10
  35. data/.github/ISSUE_TEMPLATE/---bug-report.md +0 -34
  36. data/.github/ISSUE_TEMPLATE/---feature-request.md +0 -18
  37. data/.github/workflows/ci.yml +0 -74
  38. data/.github/workflows/docsite.yml +0 -34
  39. data/.github/workflows/sync_configs.yml +0 -34
  40. data/.gitignore +0 -10
  41. data/.rspec +0 -4
  42. data/.rubocop.yml +0 -89
  43. data/.yardopts +0 -4
  44. data/CODE_OF_CONDUCT.md +0 -13
  45. data/CONTRIBUTING.md +0 -29
  46. data/Gemfile +0 -23
  47. data/Rakefile +0 -6
  48. data/bin/console +0 -16
  49. data/bin/setup +0 -7
  50. data/docsite/source/case-equality.html.md +0 -42
  51. data/docsite/source/do-notation.html.md +0 -207
  52. data/docsite/source/getting-started.html.md +0 -142
  53. data/docsite/source/index.html.md +0 -179
  54. data/docsite/source/list.html.md +0 -87
  55. data/docsite/source/maybe.html.md +0 -146
  56. data/docsite/source/pattern-matching.html.md +0 -68
  57. data/docsite/source/result.html.md +0 -190
  58. data/docsite/source/task.html.md +0 -126
  59. data/docsite/source/tracing-failures.html.md +0 -32
  60. data/docsite/source/try.html.md +0 -76
  61. data/docsite/source/unit.html.md +0 -36
  62. data/docsite/source/validated.html.md +0 -88
  63. data/log/.gitkeep +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f54a2d70bd196bdb08cc35bb339744c29f9006b01802e4d30b6365d0494812eb
4
- data.tar.gz: 9d8ba396be69616e0091a85505a1514089cd62569ad858990e3c6af1f05fb2c9
3
+ metadata.gz: 06e9ae65089e5f79f92b2d1c67d463757dc960af7a7edbd92d527c0fb6cfd997
4
+ data.tar.gz: 9d49d077c77edd1580bcc0cdd97fce2d527cabd9013b71611340b14ef6dae7d0
5
5
  SHA512:
6
- metadata.gz: 0ecbcd466aa5192858a1a5c9f5337e067e2ab12164fcf6cc4d2409bbdf3d8173587ca98278f896f1aede291e04d2b41ee38c8a4325f256615655ad8772050352
7
- data.tar.gz: cbbbf5179a3176c5ab7abae370683c4c0a00df807cfb8a17591e2f2c35214c1e4eccc69f3baca491fb883c5605ad7af9fd3fe0c2c6bedf60e1183da6aaa84bfa
6
+ metadata.gz: 5720b87b50ce55e727f169e3bf62d4ad23aa0b6779b8086e326b79cf0242b93fc9f89f840f1a3d6718d2401461a19eea6e4f0679e91499816ccf295aee619d1d
7
+ data.tar.gz: c95f43c4a51dd831d248cae4bc1afa8d226743e295081dfc4bf05a58c2e18aa146afd64dedb415b8189bbf3f2f54c0c0edb9033fb5a9367551f3fb6d88c37374
data/CHANGELOG.md CHANGED
@@ -1,10 +1,91 @@
1
- # v1.3.2 2019-11-30
1
+ <!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
2
2
 
3
- ## Fixed
3
+ ## 1.4.0 2021-07-20
4
+
5
+
6
+ ### Added
7
+
8
+ - `Unit` destructures to an empty array (flash-gordon)
9
+ - When `.value!` called on a `Failure` value the error references to the value (rewritten + flash-gordon)
10
+ ```ruby
11
+ begin
12
+ Failure("oops").value!
13
+ rescue => error
14
+ error.receiver # => Failure("oops")
15
+ end
16
+ ```
17
+ - `Result#alt_map` for mapping failure values (flash-gordon)
18
+ ```ruby
19
+ Failure("oops").alt_map(&:upcase) # => Failure("OOPS")
20
+ ```
21
+ - `Try#recover` recovers from errors (flash-gordon)
22
+ ```ruby
23
+ error = Try { Hash.new.fetch(:missing) }
24
+ error.recover(KeyError) { 'default' } # => Try::Value("default")
25
+ ```
26
+ - `Maybe#filter` runs a predicate against the wrapped value. Returns `None` if the result is false (flash-gordon)
27
+ ```ruby
28
+ Some(3).filter(&:odd?) # => Some(3)
29
+ Some(3).filter(&:even?) # => None
30
+ # no block given
31
+ Some(3 == 5).filter # => None
32
+ ```
33
+ - `RightBiased#|` is an alias for `#or` (flash-gordon)
34
+ ```ruby
35
+ None() | Some(6) | Some(7) # => Some(6)
36
+ Failure() | Success("one") | Success("two") # => Success("one")
37
+ ```
38
+
39
+ ### Fixed
40
+
41
+ - Do notation preserves method visibility (anicholson + flash-gordon)
42
+
43
+ ### Changed
44
+
45
+ - Coercing `nil` values to `None` with `Some#fmap` is officially deprecated. (flash-gordon)
46
+ Switch to `Some#maybe` when you expect `nil`.
47
+ This behavior will be dropped in 2.0 but you can opt out of warnings for the time being
48
+ ```ruby
49
+ Dry::Monads::Maybe.warn_on_implicit_nil_coercion false
50
+ ```
51
+ - Minimal Ruby version is 2.6
52
+
53
+ [Compare v1.3.5...v1.4.0](https://github.com/dry-rb/dry-monads/compare/v1.3.5...v1.4.0)
54
+
55
+ ## 1.3.5 2020-01-06
56
+
57
+
58
+ ### Added
59
+
60
+ - Smarter keys deconstruction in pattern matching (flash-gordon)
4
61
 
5
- - Warnings about keywords from Ruby 2.7 (flash-gordon)
6
62
 
7
- ## Added
63
+ [Compare v1.3.4...v1.3.5](https://github.com/dry-rb/dry-monads/compare/v1.3.4...v1.3.5)
64
+
65
+ ## 1.3.4 2019-12-28
66
+
67
+
68
+ ### Fixed
69
+
70
+ - One more delegation warning happenning in do notation (flash-gordon)
71
+
72
+
73
+ [Compare v1.3.3...v1.3.4](https://github.com/dry-rb/dry-monads/compare/v1.3.3...v1.3.4)
74
+
75
+ ## 1.3.3 2019-12-11
76
+
77
+
78
+ ### Fixed
79
+
80
+ - Incompatibility with Rails. Internal (!) halt exceptions now use mutable backtraces because spring [mutates](https://github.com/rails/spring/blob/ee687859008e947bc905b95121e306e2948d31c9/lib/spring/application.rb#L295-L311) (!) them. For the record, this a bug in Rails (johnmaxwell)
81
+
82
+
83
+ [Compare v1.3.2...v1.3.3](https://github.com/dry-rb/dry-monads/compare/v1.3.2...v1.3.3)
84
+
85
+ ## 1.3.2 2019-11-30
86
+
87
+
88
+ ### Added
8
89
 
9
90
  - Pattern matching syntax was improved by implementing `#deconstruct_keys`. Now curly braces aren't necessary when the wrapped value is a Hash (flash-gordon)
10
91
  ```ruby
@@ -12,28 +93,30 @@
12
93
  in Success(code: 200...300) then :ok
13
94
  end
14
95
  ```
96
+ - ## Internal
97
+ - Performance of do notation was improved for failing cases (1.2x to 1.3x on synthetic benchmarks) (flash-gordon)
15
98
 
16
- ## Internal
99
+ ### Fixed
100
+
101
+ - Warnings about keywords from Ruby 2.7 (flash-gordon)
17
102
 
18
- - Performance of do notation was improved for failing cases (1.2x to 1.3x on synthetic benchmarks) (flash-gordon)
19
103
 
20
104
  [Compare v1.3.1...v1.3.2](https://github.com/dry-rb/dry-monads/compare/v1.3.1...v1.3.2)
21
105
 
22
- # v1.3.1 2019-09-07
106
+ ## 1.3.1 2019-09-07
23
107
 
24
- ## Fixed
108
+
109
+ ### Fixed
25
110
 
26
111
  - Added missing `None#maybe` :sweat_smile: (flash-gordon)
27
112
 
28
- [Compare v1.3.0...v1.3.1](https://github.com/dry-rb/dry-monads/compare/v1.3.0...v1.3.1)
29
113
 
30
- # v1.3.0 2019-08-03
114
+ [Compare v1.3.0...v1.3.1](https://github.com/dry-rb/dry-monads/compare/v1.3.0...v1.3.1)
31
115
 
32
- ## BREAKING CHANGES
116
+ ## 1.3.0 2019-08-03
33
117
 
34
- - Support for Ruby 2.3 was dropped.
35
118
 
36
- ## Added
119
+ ### Added
37
120
 
38
121
  - `Result#either` (waiting-for-dev)
39
122
  ```ruby
@@ -77,7 +160,6 @@
77
160
  Dry::Monads.Success(a + b)
78
161
  end
79
162
  ```
80
-
81
163
  - `{Some,Success,Failure}#[]` shortcuts for building arrays wrapped within monadic value (flash-gordon)
82
164
  ```ruby
83
165
  Success[1, 2] # => Success([1, 2])
@@ -93,7 +175,6 @@
93
175
  end
94
176
  end # => List[1, 2, 3, 4, 5]
95
177
  ```
96
-
97
178
  - Experimental support for pattern matching! :tada: (flash-gordon)
98
179
 
99
180
  ```ruby
@@ -116,15 +197,13 @@
116
197
 
117
198
  Keep in mind this feature is experimental and can be changed by 2.7 release. But it rocks already!
118
199
 
119
- [Compare v1.2.0...v1.3.0](https://github.com/dry-rb/dry-monads/compare/v1.2.0...v1.3.0)
120
200
 
121
- # v1.2.0 2019-01-12
201
+ [Compare v1.2.0...v1.3.0](https://github.com/dry-rb/dry-monads/compare/v1.2.0...v1.3.0)
122
202
 
123
- ## BREAKING CHANGES
203
+ ## 1.2.0 2019-01-12
124
204
 
125
- - Support for Ruby 2.2 was dropped. Ruby 2.2 reached its EOL on March 31, 2018.
126
205
 
127
- ## Added
206
+ ### Added
128
207
 
129
208
  - Most of constructors now have `call` alias so you can compose them with Procs nicely if you've switched to Ruby 2.6 (flash-gordon)
130
209
  ```ruby
@@ -153,7 +232,6 @@
153
232
  List[Some(5), None(), Some(3)].collect.map { |x| x * 2 }
154
233
  # => [10, 6]
155
234
  ```
156
-
157
235
  - Right-biased monads got `#flatten` and `#and` (falsh-gordon)
158
236
 
159
237
  `#flatten` removes one level of monadic structure, it's useful when you're dealing with things like `Maybe` of `Maybe` of something:
@@ -185,7 +263,6 @@
185
263
  Some(5).and(None()) # => None()
186
264
  None().and(Some(5)) # => None()
187
265
  ```
188
-
189
266
  - Concise imports with `Dry::Monads.[]`. You're no longer required to require all desired monads and include them one-by-one, the `[]` method handles it for you (flash-gordon)
190
267
 
191
268
  ```ruby
@@ -210,18 +287,15 @@
210
287
  end
211
288
  end
212
289
  ```
213
-
214
290
  - `Task.failed` is a counterpart of `Task.pure`, accepts an exception and returns a failed task immediately (flash-gordon)
215
291
 
216
- [Compare v1.1.0...v1.2.0](https://github.com/dry-rb/dry-monads/compare/v1.1.0...v1.2.0)
217
292
 
218
- # v1.1.0 2018-10-16
293
+ [Compare v1.1.0...v1.2.0](https://github.com/dry-rb/dry-monads/compare/v1.1.0...v1.2.0)
219
294
 
220
- ## Fixed
295
+ ## 1.1.0 2018-10-16
221
296
 
222
- - Do notation was made to work nicely with inheritance. This shouldn't break any existing code but if it does please report (flash-gordon)
223
297
 
224
- ## Added
298
+ ### Added
225
299
 
226
300
  - `Success()`, `Failure()`, and `Some()` now have `Unit` as a default argument:
227
301
 
@@ -237,26 +311,34 @@
237
311
  end
238
312
  ```
239
313
 
240
- [Compare v1.0.1...v1.1.0](https://github.com/dry-rb/dry-monads/compare/v1.0.1...v1.1.0)
314
+ ### Fixed
241
315
 
242
- # v1.0.1 2018-08-11
316
+ - Do notation was made to work nicely with inheritance. This shouldn't break any existing code but if it does please report (flash-gordon)
243
317
 
244
- ## Fixed
245
318
 
246
- - Fixed behavior of `List<Validated>#traverse` in presence of `Valid` values (flash-gordon + SunnyMagadan)
319
+ [Compare v1.0.1...v1.1.0](https://github.com/dry-rb/dry-monads/compare/v1.0.1...v1.1.0)
320
+
321
+ ## 1.0.1 2018-08-11
322
+
247
323
 
248
- ## Added
324
+ ### Added
249
325
 
250
326
  - `to_proc` was added to value constructors (flash-gordon)
251
327
  ```ruby
252
328
  [1, 2, 3].map(&Some) # => [Some(1), Some(2), Some(3)]
253
329
  ```
254
330
 
331
+ ### Fixed
332
+
333
+ - Fixed behavior of `List<Validated>#traverse` in presence of `Valid` values (flash-gordon + SunnyMagadan)
334
+
335
+
255
336
  [Compare v1.0.0...v1.0.1](https://github.com/dry-rb/dry-monads/compare/v1.0.0...v1.0.1)
256
337
 
257
- # v1.0.0 2018-06-26
338
+ ## 1.0.0 2018-06-26
339
+
258
340
 
259
- ## Added
341
+ ### Added
260
342
 
261
343
  - `do`-like notation (the idea comes from Haskell of course). This is the biggest and most important addition to the release which greatly increases the ergonomics of using monads in Ruby. Basically, almost everything it does is passing a block to a given method. You call `yield` on monads to extract the values. If any operation fails i.e. no value can be extracted, the whole computation is halted and the failing step becomes a result. With `Do` you don't need to chain monadic values with `fmap/bind` and block, everything can be done on a single level of indentation. Here is a more or less real-life example:
262
344
 
@@ -308,7 +390,6 @@
308
390
  ```
309
391
 
310
392
  In the code above any `yield` can potentially fail and return the failure reason as a result. In other words, `yield None` acts as `return None`. Internally, `Do` uses exceptions, not `return`, this is somewhat slower but allows to detect failed operations in DB-transactions and roll back the changes which far more useful than an unjustifiable speed boost (flash-gordon)
311
-
312
393
  - The `Task` monad based on `Promise` from the [`concurrent-ruby` gem](https://github.com/ruby-concurrency/concurrent-ruby/). `Task` represents an asynchronous computation which _can be_ (doesn't have to!) run on a separated thread. `Promise` already offers a good API and implemented in a safe manner so `dry-monads` just adds a monad-compatible interface for it. Out of the box, `concurrent-ruby` has three types of executors for running blocks: `:io`, `:fast`, `:immediate`, check out [the docs](http://ruby-concurrency.github.io/concurrent-ruby/root/Concurrent.html#executor-class_method) for details. You can provide your own executor if needed (flash-gordon)
313
394
 
314
395
  ```ruby
@@ -334,9 +415,7 @@
334
415
  Success(create(e, n))
335
416
  end
336
417
  ```
337
-
338
418
  - `Lazy` is a copy of `Task` that isn't run until you ask for the value _for the first time_. It is guaranteed the evaluation is run at most once as opposed to lazy assignment `||=` which isn't synchronized. `Lazy` is run on the same thread asking for the value (flash-gordon)
339
-
340
419
  - Automatic type inference with `.typed` for lists was deprecated. Instead, typed list builders were added
341
420
 
342
421
  ```ruby
@@ -345,7 +424,6 @@
345
424
  ```
346
425
 
347
426
  The code above runs two tasks in parallel and automatically combines their results with `traverse` (flash-gordon)
348
-
349
427
  - `Try` got a new call syntax supported in Ruby 2.5+
350
428
 
351
429
  ```ruby
@@ -353,7 +431,6 @@
353
431
  ```
354
432
 
355
433
  Prior to 2.5, it wasn't possible to pass a block to `[]`.
356
-
357
434
  - The `Validated` “monad” that represents a result of a validation. Suppose, you want to collect all the errors and return them at once. You can't have it with `Result` because when you `traverse` a `List` of `Result`s it returns the first value and this is the correct behavior from the theoretical point of view. `Validated`, in fact, doesn't have a monad instance but provides a useful variant of applicative which concatenates the errors.
358
435
 
359
436
  ```ruby
@@ -377,13 +454,11 @@
377
454
  ```
378
455
 
379
456
  In the example above an array of `Validated` values is implicitly coerced to `List::Validated`. It's supported because it's useful but don't forget it's all about types so don't mix different types of monads in a single array, the consequences are unclear. You always can be explicit with `List::Validated[validate_name(...), ...]`, choose what you like (flash-gordon).
380
-
381
457
  - `Failure`, `None`, and `Invalid` values now store the line where they were created. One of the biggest downsides of dealing with monadic code is lack of backtraces. If you have a long list of computations and one of them fails how do you know where did it actually happen? Say, you've got `None` and this tells you nothing about _what variable_ was assigned to `None`. It makes sense to use `Result` instead of `Maybe` and use distinct errors everywhere but it doesn't always look good and forces you to think more. TLDR; call `.trace` to get the line where a fail-case was constructed
382
458
 
383
459
  ```ruby
384
460
  Failure(:invalid_name).trace # => app/operations/create_user.rb:43
385
461
  ```
386
-
387
462
  - `Dry::Monads::Unit` which can be used as a replacement for `Success(nil)` and in similar situations when you have side effects yet doesn't return anything meaningful as a result. There's also the `.discard` method for mapping any successful result (i.e. `Success(?)`, `Some(?)`, `Value(?)`, etc) to `Unit`.
388
463
 
389
464
  ```ruby
@@ -393,26 +468,19 @@
393
468
  # ... wait for the task to finish ...
394
469
  # => Task(valut=Unit)
395
470
  ```
396
-
397
- ## Deprecations
398
-
471
+ - ## Deprecations
399
472
  - `Either`, the former name of `Result`, is now deprecated
400
-
401
- ## BREAKING CHANGES
402
-
473
+ - ## BREAKING CHANGES
403
474
  - `Either#value` and `Maybe#value` were both droped, use `value_or` or `value!` when you :100: sure it's safe
404
475
  - `require 'dry/monads'` doesn't load all monads anymore, use `require 'dry/monads/all'` instead or cherry pick them with `require 'dry/monads/maybe'` etc (timriley)
405
476
 
477
+
406
478
  [Compare v0.4.0...v1.0.0](https://github.com/dry-rb/dry-monads/compare/v0.4.0...v1.0.0)
407
479
 
408
- # v0.4.0 2017-11-11
480
+ ## 0.4.0 2017-11-11
409
481
 
410
- ## Changed
411
482
 
412
- - The `Either` monad was renamed to `Result` which sounds less nerdy but better reflects the purpose of the type. `Either::Right` became `Result::Success` and `Either::Left` became `Result::Failure`. This change is backward-compatible overall but you will see the new names when using old `Left` and `Right` methods (citizen428)
413
- - Consequently, `Try::Success` and `Try::Failure` were renamed to `Try::Value` and `Try::Error` (flash-gordon)
414
-
415
- ## Added
483
+ ### Added
416
484
 
417
485
  - `Try#or`, works as `Result#or` (flash-gordon)
418
486
  - `Maybe#success?` and `Maybe#failure?` (aliases for `#some?` and `#none?`) (flash-gordon)
@@ -427,24 +495,30 @@
427
495
  else raise TypeError
428
496
  end
429
497
  ```
498
+ - ## Deprecated
499
+ - Direct accessing `value` on right-biased monads has been deprecated, use the `value!` method instead. `value!` will raise an exception if it is called on a Failure/None/Error instance (flash-gordon)
430
500
 
431
- ## Deprecated
501
+ ### Changed
432
502
 
433
- - Direct accessing `value` on right-biased monads has been deprecated, use the `value!` method instead. `value!` will raise an exception if it is called on a Failure/None/Error instance (flash-gordon)
503
+ - The `Either` monad was renamed to `Result` which sounds less nerdy but better reflects the purpose of the type. `Either::Right` became `Result::Success` and `Either::Left` became `Result::Failure`. This change is backward-compatible overall but you will see the new names when using old `Left` and `Right` methods (citizen428)
504
+ - Consequently, `Try::Success` and `Try::Failure` were renamed to `Try::Value` and `Try::Error` (flash-gordon)
434
505
 
435
506
  [Compare v0.3.1...v0.4.0](https://github.com/dry-rb/dry-monads/compare/v0.3.1...v0.4.0)
436
507
 
437
- # v0.3.1 2017-03-18
508
+ ## 0.3.1 2017-03-18
509
+
438
510
 
439
- ## Fixed
511
+ ### Fixed
440
512
 
441
513
  - Fixed unexpected coercing to `Hash` on `.bind` call (flash-gordon)
442
514
 
515
+
443
516
  [Compare v0.3.0...v0.3.1](https://github.com/dry-rb/dry-monads/compare/v0.3.0...v0.3.1)
444
517
 
445
- # v0.3.0 2017-03-16
518
+ ## 0.3.0 2017-03-16
519
+
446
520
 
447
- ## Added
521
+ ### Added
448
522
 
449
523
  - Added `Either#either` that accepts two callbacks, runs the first if it is `Right` and the second otherwise (nkondratyev)
450
524
  - Added `#fmap2` and `#fmap3` for mapping over nested structures like `List Either` and `Either Some` (flash-gordon)
@@ -454,59 +528,69 @@
454
528
  - Added `List#traverse` that "flips" the list with an embedded monad (flash-gordon + damncabbage)
455
529
  - Added `#tee` for all right-biased monads (flash-gordon)
456
530
 
531
+
457
532
  [Compare v0.2.1...v0.3.0](https://github.com/dry-rb/dry-monads/compare/v0.2.1...v0.3.0)
458
533
 
459
- # v0.2.1 2016-11-13
534
+ ## 0.2.1 2016-11-13
460
535
 
461
- ## Added
536
+
537
+ ### Added
462
538
 
463
539
  - Added `Either#tee` that is similar to `Object#tap` but executes the block only for `Right` instances (saverio-kantox)
464
540
 
465
- ## Fixed
541
+ ### Fixed
466
542
 
467
543
  - `Right(nil).to_maybe` now returns `None` with a warning instead of failing (orisaka)
468
544
  - `Some#value_or` doesn't require an argument because `None#value_or` doesn't require it either if a block was passed (flash-gordon)
469
545
 
546
+
470
547
  [Compare v0.2.0...v0.2.1](https://github.com/dry-rb/dry-monads/compare/v0.2.0...v0.2.1)
471
548
 
472
- # v0.2.0 2016-09-18
549
+ ## 0.2.0 2016-09-18
550
+
473
551
 
474
- ## Added
552
+ ### Added
475
553
 
476
554
  - Added `Maybe#to_json` as an opt-in extension for serialization to JSON (rocknruby)
477
555
  - Added `Maybe#value_or` which returns you the underlying value with a fallback in a single method call (dsounded)
478
556
 
557
+
479
558
  [Compare v0.1.1...v0.2.0](https://github.com/dry-rb/dry-monads/compare/v0.1.1...v0.2.0)
480
559
 
481
- # v0.1.1 2016-08-25
560
+ ## 0.1.1 2016-08-25
561
+
482
562
 
483
- ## Fixed
563
+ ### Fixed
484
564
 
485
565
  - Added explicit requires of `dry-equalizer`. This allows to safely load only specific monads (artofhuman)
486
566
 
567
+
487
568
  [Compare v0.1.0...v0.1.1](https://github.com/dry-rb/dry-monads/compare/v0.1.0...v0.1.1)
488
569
 
489
- # v0.1.0 2016-08-23
570
+ ## 0.1.0 2016-08-23
490
571
 
491
- ## Added
572
+
573
+ ### Added
492
574
 
493
575
  - Support for passing extra arguments to the block in `.bind` and `.fmap` (flash-gordon)
494
576
 
495
- ## Changed
577
+ ### Changed
496
578
 
497
579
  - Dropped MRI 2.0 support (flash-gordon)
498
580
 
499
581
  [Compare v0.0.2...v0.1.0](https://github.com/dry-rb/dry-monads/compare/v0.0.2...v0.1.0)
500
582
 
501
- # v0.0.2 2016-06-29
583
+ ## 0.0.2 2016-06-29
584
+
502
585
 
503
- ## Added
586
+ ### Added
504
587
 
505
588
  - Added `Either#to_either` so that you can rely on duck-typing when you work with different types of monads (timriley)
506
589
  - Added `Maybe#to_maybe` for consistency with `#to_either` (flash-gordon)
507
590
 
591
+
508
592
  [Compare v0.0.1...v0.0.2](https://github.com/dry-rb/dry-monads/compare/v0.0.1...v0.0.2)
509
593
 
510
- # v0.0.1 2016-05-02
594
+ ## 0.0.1 2016-05-02
511
595
 
512
596
  Initial release containing `Either`, `Maybe`, and `Try` monads.