Skip to content

v3.0.0

Latest
Compare
Choose a tag to compare
@bolshakov bolshakov released this 02 Apr 21:06
· 1 commit to master since this release

What's Changed

Left projection allows performing right-biased operation of the left side of the Fear::Either:

Fear.left(42).left.map(&:succ)  #=> Fear.left(43)
Fear.right(42).left.map(&:succ) #=> Fear.left(42)

Before implementing left projection, the same operation was possible to achieve with double swapping:

Fear.left(42).swap.map(&:succ).swap  #=> Fear.left(43)
Fear.right(42).swap.map(&:succ).swap #=> Fear.left(42)
Fear.option(42).apply { puts "The answer is #{_1}" }

the above code is the same as the following:

Fear.option(42).each { puts "The answer is #{_1}" }
  • Code cleanup by @bolshakov in #171
    • Remove development dependencies from the gem-spec
    • Reorganised files structure
  • Test against ruby >= 3.1.0 by @bolshakov in #170
  • Use zeitwerk to load fear files by @bolshakov in #172

Breaking Changes

  • Extract Dry::Types integration into a separate gem by @bolshakov in #173

To use Fear::Option as optional type for Dry::Types use the dry-types-fear gem.

Consider using Data from the standard library.

New Contributors

Full Changelog: v2.0.1...v3.0.0