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
Logan Ince
cse341-22wi-public
Commits
f0884d25
Commit
f0884d25
authored
Dec 30, 2021
by
Dan Grossman
Browse files
section 1 code
parent
d2d1a86b
Changes
2
Hide whitespace changes
Inline
Side-by-side
section/sec01/sec01-errors-fixed.ml
0 → 100755
View file @
f0884d25
(* Section 1: Some Errors *)
(* This program has several errors in it so we can try to debug them. *)
let
x
=
34
let
y
=
x
+
1
let
z
=
if
y
>
0
then
false
else
x
<
4
(* This is still bad style, equivalent with:
not (y > 0) && x < 4 *)
let
q
=
if
y
>
0
then
0
else
42
let
w
=
0
let
letter
=
34
let
v
=
4
.
0
/.
2
.
0
let
u
=
x
/
(
w
+
1
)
(* Can't have let bindings start with numbers *)
let
cse341
=
true
section/sec01/sec01-errors.ml
0 → 100755
View file @
f0884d25
(* Section 1: Some Errors *)
(* This program has several errors in it so we can try to debug them. *)
let
x
=
34
y
=
x
+
1
let
z
=
if
y
then
34
else
x
<
4
let
q
=
if
y
>
0
then
0
let
w
=
0
let
let
=
34
let
v
=
4
.
0
/
2
.
0
let
u
=
x
/
w
let
0
cse341
=
true
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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