Closed yfzhe closed 4 years ago
This can be done by simply installing typed-racket-lib
right?
Then current
#lang racket
(provide add)
(define (add a b) (+ a b))
can also be written with types:
#lang typed/racket
(provide add)
(: add (-> Integer Integer Integer))
(define (add a b) (+ a b))
Yes.
It seems that the racket environment codewars using is minimal-racket, which lacks typed-racket-lib
. So installing it is the solution.
Cool. Just wanted to make sure I wasn't misunderstanding.
Yeah, it's using minimal-racket because the default installation includes a lot of things that's never going to be used and makes the container image much larger.
I'll close this when I deploy it.
Deployed
Typed Racket is gradual typing variant of racket. We can write static typing programs with it.
:+1: reactions might help.