Lecture overview -- Keyboard shortcut: 'u'  Previous page: Recipe datastructure (1) -- Keyboard shortcut: 'p'  Next page: A Recipe XML language -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Slide 19 : 30

Recipe datastructure (2)
Representing recipes as lists in Scheme
(define (present-recipe r)
  (div 'class "recipe"
    (h3 (title-of-recipe r))
    (b "Ingredients")
    (ul      
      (map 
        (compose li present-ingredient) 
        (ingredient-list-of-recipe r)))
    (b "Procedure:")
    (ol(map li (steps-of-recipe r)))))
recipes.laml
Entire document.
A raw list approach - Easy to make errors in list structure - misspelling and structural errors