diff options
Diffstat (limited to 'doc/docs/frontend')
-rw-r--r-- | doc/docs/frontend/syntax.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/docs/frontend/syntax.md b/doc/docs/frontend/syntax.md index 836201c..17436af 100644 --- a/doc/docs/frontend/syntax.md +++ b/doc/docs/frontend/syntax.md @@ -40,19 +40,19 @@ Type synonyms can be defined with: ## Functions ```snug -(fun length ((xs : List a)) : Int - (length_acc 0 xs)) +(fun length ((xs : List a)) : Int : + length_acc 0 xs) -(fun length_acc ((n : Int) (xs : List a)) : Int - (case xs ( +(fun length_acc ((n : Int) (xs : List a)) : Int : + case xs ( (Nil -> n) - (Cons _ xs -> length_acc (+ n 1) xs)))) + (Cons _ xs -> length_acc (+ n 1) xs))) ``` In abstract terms, the syntax is: ```snug -(fun NAME (ARGUMENTS) : TYPE (EXPRESSION)) +(fun NAME (ARGUMENTS) : TYPE : EXPRESSION) ``` where arguments are of the form `(NAME : TYPE)`. |