deterministic icon indicating copy to clipboard operation
deterministic copied to clipboard

Functional - deterministic - Ruby made fun

Results 11 deterministic issues
Sort by recently updated
recently updated
newest added

Hello and thanks for the gem, are you planning to bump a new version anytime soon?

Hi. I have a question about in_sequence!. ```ruby require 'deterministic' class Foo include Deterministic::Prelude def call(id: nil) result = in_sequence do get(:id) { get_id(id) } get(:ctx) { id == 10...

This is a basic example for `Failure` and `Success` monads. ``` Ruby RSpec::Matchers.define :be_success do |expected| if expected.nil? match { |actual| actual.success? } failure_message { |actual| "Actual `#{actual}` isn't a...

Is this project still active?

Hi. I have a question about behavior of `try!`. ``` ruby try! { 1 } # => Success(1) try! { Success(1) } # => Success(1) try! { Failure(1) } #...

I would like to be able to do somehting like this ``` ruby Maybe(nil).match do Some(s) { |v| s } None(n) { |v| SomeObject.new } end #=> SomeObject.new ``` Is...

This all looks very interesting, but can you provide a few practical examples of when, where, why and how this might be used?

It would be useful to keep some standard with the vast majority of ruby libraries out there. Just a suggestion.

I'm trying to use the equivalent of `>>` in haskell, which discards the result of the previous call: ``` ruby require 'deterministic' class X extend Deterministic def self.util(message, ctx) Success(message)...

Getting this warning with running tests by `rspec -w` ``` .../.rvm/gems/ruby-2.7.7/bundler/gems/deterministic-3c6e3f2a1acc/lib/deterministic/sequencer.rb:27: warning: instance variable @sequenced_operations not initialized ```