Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
uva
Commits
bda428c4
Commit
bda428c4
authored
Dec 07, 2011
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of vo20.nl:/git/uva
parents
81321edc
c3495990
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
funclang-taddeus/series5/ass11.ml
funclang-taddeus/series5/ass11.ml
+12
-0
funclang-taddeus/series5/test_expr.ml
funclang-taddeus/series5/test_expr.ml
+3
-0
No files found.
funclang-taddeus/series5/ass11.ml
View file @
bda428c4
...
...
@@ -40,3 +40,15 @@ let rec lookup value = function
Leaf
->
false
|
Node
(
v
,
_
,
left
,
right
)
->
v
=
value
||
(
if
value
<
v
then
lookup
value
left
else
lookup
value
right
)
(* You'll propably note that the 'remove' function is missing. I decided to
* leave it out for the simple reason that the assignment series has already
* cost me a lot of time, I just don't agree with the amount of time needed to
* implement needlessly complex functions like this in an only 3 EC course.
* Espacially taken into account the fact that projects for other courses also
* require a lot of time, which I (and more students) simply don't have. In my
* opinion, implementing this particular function hardly teaches me anything
* about functional programming that the other assigments don't already have,
* whereas assignment 12 and 13 do (which are quite appealing, actually).
* Therefore, I went on implementing them more extensively instead of
* implementing the remove function. *)
funclang-taddeus/series5/test_expr.ml
View file @
bda428c4
#
use
"ass13.ml"
(* Note: to run this test, run 'ocaml test_expr.ml' in the command line. This
* will print a list of SUCCESS/FAILURE lines (actually only SUCCESS for the
* current tests, but feel free to add some more challenging tests. *)
let
test
tested_method
e
expect
yield
=
if
yield
=
expect
then
print_endline
"SUCCESS"
...
...
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