Open eki opened 4 years ago
Change substitute to eval (or, evaluate)?
substitute
eval
evaluate
At the same time, change the method to take keyword options or a hash. We'd like to do something like this:
craft!('2x + y + 4').eval(x: 4, y: 3) # => 15 craft!('2x + y + 4').eval(y: 3) # => 2x + 7
Evaluation should be lazy or immediate depending on whether we're working with a lazy or immediate object.
It might be nice to have something to convert to a lambda?
eq = craft!('2x + y + 4').to_proc eq.call(x: 2) # => y + 8
Although, it's kind of difficult to imagine the value of converting an equation into a lambda?
Change
substitute
toeval
(or,evaluate
)?At the same time, change the method to take keyword options or a hash. We'd like to do something like this:
Evaluation should be lazy or immediate depending on whether we're working with a lazy or immediate object.
It might be nice to have something to convert to a lambda?
Although, it's kind of difficult to imagine the value of converting an equation into a lambda?