Last active
January 19, 2019 19:21
-
-
Save samdphillips/1430d0396fe45b6a45fabede0a6d53e4 to your computer and use it in GitHub Desktop.
access fields in Racket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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