Play audio slide show -- Keyboard shortcut: 'x'  Lecture overview -- Keyboard shortcut: 'u'  Previous page: Conditional expressions -- Keyboard shortcut: 'p'  Next page: Example with <kbd>cond</kbd>: <kbd>leap-year?</kbd> -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home      Name binding, Recursion, Iteration, and Continuations - slide 11 : 42

Examples with if
 

Expression

Value

(body
  (if (string=? 
        (weekday (current-time))
        "Wednesday")
      (p (em "Remember Thursday meeting!"))
      '( ))

  (h1 "Schedule")

  (p "..."))

Remember the Thursday meeting tomorrow!

Schedule

...

(body
  (p (if (string=? 
           (weekday (current-time))
           "Wednesday")
         (em "Remember Thursday meeting!")
         '( )))

  (h1 "Schedule")

  (p "..."))

Remember the Thursday meeting tomorrow!

Schedule

...