timriley on add-file-path-to-component
timriley on main
Expose Component#file_name Thi… Merge pull request #237 from dr… (compare)
timriley on add-file-path-to-component
Expose Component#file_name Thi… (compare)
timriley on nil-import-namespaces
Rename spec (compare)
sequence
signature is: F[G[A]] -> G[F[A]]
traverse
acts as sequence
https://github.com/dry-rb/dry-monads/blob/master/lib/dry/monads/list.rb#L263-L286
hum maybe this is better:
future_rows = Dry::Monads::List.[]
requests.find_in_baches { |data|
future_rows += Task[:io] { compute_rows(data) }
}
future_rows.traverse { |rows|
…
}
WDYT ?
Monads::List
isn't meant to be mutable
future_rows = []
coerce
?
List.new
, it's O(1)
Fruit
and if its name
field was "banana"
then my_fruit.banana?
would return true
. or... should there be helper functions like is_banana?(fruit)
is this something sensible:
def failed(error)
Dry::Monads::Task.new(Concurrent::Promise.reject(error))
end
???