Skip to content

Instantly share code, notes, and snippets.

@samdphillips
Last active January 19, 2019 19:21
Show Gist options
  • Save samdphillips/1430d0396fe45b6a45fabede0a6d53e4 to your computer and use it in GitHub Desktop.
Save samdphillips/1430d0396fe45b6a45fabede0a6d53e4 to your computer and use it in GitHub Desktop.
access fields in Racket
#lang racket
(define foo%
(class object%
(init-field f)
(define/public (get-f) f)
(super-new)))
(define foo (make-object foo% 42))
(send foo get-f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment