Title: Advanced Functional Programming with Elixir (page 21)
Example: Programming Flutter: ‘pub get’ command not working (page 15)
Hi,
I feel that in a large codebase (i.e. outside of a textbook) equality check should be a part of value object’s module:
I.e.
FastPass.eq_time(fast_pass_a, fast_pass_b) instead of
has_eq_time = FunPark.FastPass.eq_time() FunPark.Eq.Utils.eq?(fast_pass_a, fast_pass_b, has_eq_time) The eq_time could then call FunPark.Eq.Utils.eq?
def eq_time(fast_pass_a, fast_pass_b) do has_eq_time = Eq.Utils.contramap(&get_time/1)# is this a correct variable name? FunPark.Eq.Utils.eq?(fast_pass_a, fast_pass_b, has_eq_time) end Is this something that you’d consider doing?