Fixed small derp
This commit is contained in:
parent
e9a739b33e
commit
d5d86bee62
18
polymani.pl
18
polymani.pl
@ -118,12 +118,12 @@ do_process_input(show(void, T)) :-
|
|||||||
nl.
|
nl.
|
||||||
do_process_input(store(P, T)) :-
|
do_process_input(store(P, T)) :-
|
||||||
assertz(polynomial_store(P, T)).
|
assertz(polynomial_store(P, T)).
|
||||||
%% do_process_input(show(store(P, T))) :-
|
do_process_input(show(store(P), T)) :-
|
||||||
%% assertz(polynomial_store(P, T)),
|
assertz(polynomial_store(P, T)),
|
||||||
%% write(P),
|
write(P),
|
||||||
%% write(" = "),
|
write(" = "),
|
||||||
%% print_polynomial_tree(T),
|
print_polynomial_tree(T),
|
||||||
%% nl.
|
nl.
|
||||||
do_process_input(forget(P)) :-
|
do_process_input(forget(P)) :-
|
||||||
retract(polynomial_store(P, _)).
|
retract(polynomial_store(P, _)).
|
||||||
do_process_input(simplify(PT)) :-
|
do_process_input(simplify(PT)) :-
|
||||||
@ -417,9 +417,7 @@ parse_polynomial_explicit(void-_, T) -->
|
|||||||
|
|
||||||
parse_command(show_stored_polynomials) -->
|
parse_command(show_stored_polynomials) -->
|
||||||
[show, stored, polynomials].
|
[show, stored, polynomials].
|
||||||
parse_command(show(P, T),
|
parse_command(show(store(P, T), T)) -->
|
||||||
command(store(P, T),
|
|
||||||
void)) -->
|
|
||||||
[show],
|
[show],
|
||||||
parse_polynomial(T),
|
parse_polynomial(T),
|
||||||
[as],
|
[as],
|
||||||
@ -430,7 +428,7 @@ parse_command(forget(P)) -->
|
|||||||
parse_command(show(load(P), void)) -->
|
parse_command(show(load(P), void)) -->
|
||||||
[show],
|
[show],
|
||||||
parse_stored_variable(P).
|
parse_stored_variable(P).
|
||||||
parse_command(show(void, T)) --> %% NOTE Probably easier if the tree is always binary
|
parse_command(show(void, T)) -->
|
||||||
[show],
|
[show],
|
||||||
parse_polynomial(T),
|
parse_polynomial(T),
|
||||||
{ nonvar(T) }.
|
{ nonvar(T) }.
|
||||||
|
Reference in New Issue
Block a user