[racket-users] Re: recursive definition of a PROPOSITION

2016-02-19 Thread Aysenur Türk
(define (a) (case (random 6) [(0) (string-append "P" (a)"→" )] [(1) (string-append "R" (a) "↔")] [(2) (string-append "T" (a)"∧" ) ] [(3) (string-append "Z" (a)"⊕")] [(4) (string-append "S" (a) "q")] [(5) "" ])) (a) "RPRZTZPRZPZT∧⊕→⊕↔→⊕∧⊕↔→↔" "TPTZ⊕∧→∧" I tried it

[racket-users] recursive definition of a PROPOSITION

2016-02-17 Thread Aysenur Türk
(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