Skip to content

Problem with typeclasses blog post #352

Answered by stylewarning
bon asked this question in Help!
Discussion options

You must be logged in to vote

Sorry, sqrt isn't in the standard library. Add this above the distance definition:

(declare sqrt (Single-Float -> Single-Float))
(define (sqrt x)
  (lisp Single-Float (x)
    (cl:sqrt x)))

I'm not exactly sure where sqrt should go in the standard library yet.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help!
Labels
None yet
2 participants