I am having trouble figuring out how to access specific pair information in Racket.
Say I am given some list like this:
(define database-of-components
'((p1 200 (2 p2) (3 p3))
(p2 8 (2 p4))
(p3 60 (1 p5) (2 p6) (3 p7))
(p4 2)
(p5 2)
...
))
How am I able to access the data contained in some individual pn? Say I am trying to get just 200 from p1 or just 60 from p3... how might I do this?
Note: This is obviously for a homework assignment but this question is just to get started.