CSC104H1 Lecture Notes - Lecture 9: Animage

42 views4 pages

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))

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents