Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :-arithmetic_function(!/1).
- :-arithmetic_function(!/2).
- :-arithmetic_function('!!'/1).
- :-arithmetic_function('!!'/2).
- :-op(300,xf,!).
- :-op(300,xf,'!!').
- !(0,1) :- !.
- !(1,1) :- !.
- !(N,W):-
- N > 0,
- N1 is N-1,
- !(N1,W1),
- W is N*W1.
- '!!'(1,1) :- !.
- '!!'(N,W):-
- N > 0,
- N1 is N-2,
- '!!'(N1,W1),
- W is N*W1.
Add Comment
Please, Sign In to add comment