bags.fun 432 B

1234567891011121314151617181920
  1. #import std
  2. #library+
  3. goody_bag :: # record declaration with typed fields
  4. number_of_items %n # field types are specified like this
  5. cost %e
  6. celebrity_rank %cZ
  7. occasion %s
  8. hypoallergenic %b
  9. goodies = # an instance of the typed record
  10. goody_bag[
  11. number_of_items: 6,
  12. cost: 125.00,
  13. celebrity_rank: `B,
  14. occasion: 'Academy Awards',
  15. hypoallergenic: true]