From f6b553eb5a6ca5413c5c71dfed89234a19a47b9b Mon Sep 17 00:00:00 2001 From: Alexander Nutz Date: Fri, 12 Sep 2025 10:37:44 +0200 Subject: [PATCH] oops --- spec.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec.md b/spec.md index d045283..4eb8f9d 100644 --- a/spec.md +++ b/spec.md @@ -188,15 +188,15 @@ def example(li: List[Char]) -> {t:Token,rem:List[Char]} { ## recursive data types ``` -type List[t] = {head:t, tail:List[t]} +type List[t] = 'End | 'Cons {head:t, tail:List[t]} # now you might notice an issue with this # `type` defines non-distinct type alisases # so what is the type of this... # Introducing: type self references # the above example is the same as this: -type List[t] = &a {head:t, tail:a} +type List[t] = &a ('End | 'Cons {head:t, tail:a}) # example 2: # a List[List[t]] is just: -&b {head: &a {head:t, tail:a}, tail: b} +&b ('End | 'Cons {head: &a ('End | 'Cons {head:t, tail:a}), tail: b}) ``` \ No newline at end of file