`(List* T)` is the same as `T`, just as `(list* x)` is the same as `x`
(whether `x` is a list or not).
> (require typed/racket)
> (list* 4 5 6)
- : (List* Positive-Byte Positive-Byte Positive-Byte)
'(4 5 . 6)
> (list* 6)
- : Integer [more precisely: Positive-Byte]
6
> (:type (List*
`(List* T)` is just `T`. This follows the behavior of the `list*`
function, where `(list* 5)` produces 5.
You can explore this using the `:type` form at the REPL. For example,
```
> (:type (List* String))
String
> (:type (List* String String))
(Pairof String String)
> (:type (List* String (List S
On Wed, Jun 03, 2020 at 04:22:41PM +0100, Stephen De Gabrielle wrote:
> Hi Hendrik,
>
> I can't see the example you mention in
> https://docs.racket-lang.org/ts-reference/type-ref.html#%28form._%28%28lib._typed-racket%2Fbase-env%2Fbase-types-extra..rkt%29._.List%2A%29%29
>
> i'm assuming (List* c
Hi Hendrik,
I can't see the example you mention in
https://docs.racket-lang.org/ts-reference/type-ref.html#%28form._%28%28lib._typed-racket%2Fbase-env%2Fbase-types-extra..rkt%29._.List%2A%29%29
i'm assuming (List* c) is shorthand for (Pair c null)? I don't know typed
racket so I've probably got t
4 matches
Mail list logo