* we can write our own operations!
* you can use WeScheme's Recipe button to help with
this; (it is a version of a Design Recipe,
an approach to thoughtfully designing functions
and programs...)
(define (new-op-name param-var1 param-var1 ...)
body-expression
)
* what if we wanted to write
functions to help us in filling out premise and
conclusion columns in a truth table?
...we could do that!
p->q
...let's write a function if-then!
remember its truth table?
P Q P->Q
-------------
T T T
T F F
F T T
F F T
* ONE of SEVERAL ways of approaching this:
hey, this should only be false if
P is true AND Q is false
SO, if it is NOT, then I should get true;
(not (and p (not q)))
* NOW that I have if-then,
I can USE it through the rest of this file/
this WeScheme window!
(and I can paste it into others as desired...)
* see examples from WeScheme for function
green-party-concl, which uses if-then;