-1

I have a structure as:

(define-struct abc (item-list x y))

I want to access elements of item-list which is a list iteratively. How do I achieve this in racket?

I tried:

(abc-item-list a)

but doesn't work.

Note: I am using Intermediate Student Language for the same.

soegaard
  • 30,661
  • 4
  • 57
  • 106
Deesha
  • 538
  • 8
  • 27

1 Answers1

1

It works for me:

#lang htdp/isl ;https://stackoverflow.com/questions/18303242/selecting-student-language-in-racket-source-code

(define-struct abc (item-list x y))
(define test (make-abc (list 1 2) 4 5))
(abc-item-list test)
; ==> (list 1 2)
Sylwester
  • 47,942
  • 4
  • 47
  • 79