Commit 519168fe authored by HEMERY Mathieu's avatar HEMERY Mathieu
Browse files

Use lambda function to allow any exponant in filter_denominator

parent 8106df1d
......@@ -61,6 +61,7 @@
% Only for separate compilation/linking
:- use_module(doc).
:- use_module(reaction_rules).
:- use_module(library(yall)).
:- op(1010, fx, init). % comma is 1000
:- op(1010, fx, par).
......@@ -1441,10 +1442,8 @@ filter_denominator(X^Nr, Num, Den) :-
filter_denominator(X, Num, Den)
;
filter_denominator(X, NumT, DenT),
assert(powerN(X,X^N)),
maplist(powerN,NumT,Num),
maplist(powerN,DenT,Den),
retract(powerN(X,X^N))
maplist([X,Y]>>(Y = X^N), NumT, Num),
maplist([X,Y]>>(Y = X^N), DenT, Den)
).
filter_denominator(X, [X], []).
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment