CSC104H1 Lecture Notes - Lecture 9: Animage
Document Summary
;the operation "or" takes two or more expressions, evaluates them in order, determining if at least one of them is true. ;the "truth table" for every combination of two booleans: (check-expect (or #false #false) #false) > ;that is "inclusive or", which si sometimes written and/or in english. ;or stops when one is true (step parallel (or (< 1 2) (/ 1 0))) steps (or (< 1 2) (/ 1 0)) (or #true (/ 1 0)) > (check-expect (sorted? (list 123 456 789)) #true) (check-expect (sorted? (list 123 45 789)) #false) > (check-expect (sorted? (list 123 456 543)) (< 123 456 543)) > ;we also consider a list with a single number, or no numbers, to still be. (define (sorted? a-list-of-numbers)) define: expects an expression for the function body, but nothing"s there. > (step parallel (sorted? (list 104))) steps (sorted? (list 104))