PasteRack.org
Paste # 48802
2022-05-14 00:07:54

Fork as a new paste.

Paste viewed 1310 times.


Embed:

  1. #lang racket
  2.  
  3. (struct s0 (a b) #:prefab)
  4. (struct s1 s0 (c d) #:prefab)
  5.  
  6. (for/list ([s (in-list (list "#s(s0 1 2)"
  7.                              "#s(s1 1 2 3 4)"))])
  8.   (s0-a (read (open-input-string s)))
  9.   )

=>