Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add defmethod and some uses of the deref operator #51

Merged
merged 4 commits into from
Sep 19, 2020
Merged

Conversation

water111
Copy link
Collaborator

Now we can do things like override the default print method

(defmethod print bfloat ((obj bfloat))
  "Override the default print method to print a bfloat like a normal float"
  (format #t "~f" (-> obj data))
  obj
  ) 

or print the parent type of the parent type of the type type.

(print (-> type parent parent))

This is working toward #49

@water111 water111 merged commit c7c342c into master Sep 19, 2020
@water111 water111 deleted the w/defmethod branch September 19, 2020 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant