I'm making a program in the plai-typed language, however I want to use the functions 'car' and 'cdr'
(require (typed-in racket
(car : (pair -> any/c))
(cdr : (pair -> any/c))))
However it gives me the error pair:bad type
Why is this? What 'type' should I fill in instead of 'pair' since in the documentation it says that the input for both function is a pair.
I tried typing 'Pair' 'pair' 'Pairs' 'pairs' however none work
I think you want
(... * ...)Then:
Valid types are listed in https://docs.racket-lang.org/plai-typed/index.html#%28part._.Types%29.
any/corpairis not valid one.Also note that there're
pair,fst,sndinplai-typed.