(define( app L1 L2)
(if(empty? L1) L2
(cons (car L1) (app(cdr L1)L2))))
(app ((list "↔" "→" "∧" "⊕" "∨" "¬")) (list "P" "Q" "R" "S" "U" "X" "Y" "Z"))
(define L (list "↔" "→" "∧" "⊕" "∨" "¬"))
(define ( f L n)
(if (= n 0) "p"
(string-append "p" (car L) (f(cdr L) (- n 1)))))
(f L 3)
You have the following recursive definition of a PROPOSITION:
T, F are propositions ( truth value of propositional variables) List item
Propositional letters P, Q , R, S,U,X, Y, Z are propositions. If A is a
proposition the ¬A is a proposition. If A and B are propositions then A⊕B , A→B
, A∧B, A∨B , A↔B are propositions. Write a DrRacket procedure that will
randomly generate a proposition with a given number of operations .
2 formulas calculated by your program (the formulas must contain 3 different
variables and 6 operatıons .
Hi everyon I'm new here.Can anyone help me for this problem ? I tried the solve
it but it's probably wrong I didn't understand clearly because I'm a new in
racket programming language.Thanks in advance for your answers !!
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.