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

2016-02-18 Thread Daniel Prager
Hi Aysenur Here are some hints: - It's simpler to work with symbols than strings in this sort of problem. E.g. (define ops '(↔ → ∧ ⊕ ∨ ¬)) (define propositions '(P Q R X Y Z)) - It helps to start by solving a simpler problem. Can you write a function (random-simple-expression) to

[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