Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Fraction contexts as extensions so you can add fractions to other compatible contexts. #1108

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
7 changes: 3 additions & 4 deletions lib/Value.pm
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,9 @@ sub matchNumber { my $n = shift; $n =~ m/^$$Value::context->{pattern}{signedNu
sub matchInfinite { my $n = shift; $n =~ m/^$$Value::context->{pattern}{infinite}$/i }
sub isReal { classMatch(shift, 'Real') }
sub isComplex { classMatch(shift, 'Complex') }
# sub isContext {class(shift) eq 'Context'} # MEG
sub isContext { my $symbol = shift || ""; class($symbol) eq 'Context' }
sub isFormula { classMatch(shift, 'Formula') }
sub isParser { my $v = shift; isBlessed($v) && $v->isa('Parser::Item') }
sub isContext { class(shift // '') eq 'Context' }
sub isFormula { classMatch(shift, 'Formula') }
sub isParser { my $v = shift; isBlessed($v) && $v->isa('Parser::Item') }

sub isValue {
my $v = shift // '';
Expand Down
Loading