Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
743ae321
Commit
743ae321
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2003-07-29 09:58:19 by cvscast] Typo
Original author: cvscast Date: 2003-07-29 09:58:19+00:00
parent
f15016e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/examples/reference.cd
View file @
743ae321
...
@@ -13,8 +13,10 @@ let fun push(x : Int) : [] =
...
@@ -13,8 +13,10 @@ let fun push(x : Int) : [] =
let fun pop ([] : []) : Int =
let fun pop ([] : []) : Int =
match !stack with [x; y] -> stack := y; x | _ -> raise "Empty stack"
match !stack with [x; y] -> stack := y; x | _ -> raise "Empty stack"
(* In [ pattern ;y] the variable y captures the rest of the *)
(* In a pattern [ ... ; y] the variable y captures the rest of the *)
(* sequence. It is equivalent to [pattern y::_*] *)
(* sequence. It is equivalent to [ ... y::_*]. *)
(* In an expression [ ... ; e ] the expression e denote the tail of*)
(* the sequence. It is equivaent to [ ... ] @ y *)
;;
;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment