-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcoursework5.fsx
More file actions
48 lines (33 loc) · 1.62 KB
/
Copy pathcoursework5.fsx
File metadata and controls
48 lines (33 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
(*
ITT8060 -- Advanced Programming 2015
Department of Computer Science
Tallinn University of Technology
------------------------------------
Coursework 5: Records, List.collect and Charting
------------------------------------
Name:
Student ID:
------------------------------------
Answer the questions below. You answers to the questions should be
correct F# code written after the question. This file is an F# script
file; it should be possible to load the whole file at once. If you
can't, then you have introduced a syntax error somewhere.
This coursework will be graded.
Commit and push your solution to the repository as file
coursework5.fsx in directory coursework5.
The deadline for completing the above procedure is Friday,
October 30, 2015.
We will consider the submission to be the latest version of the
appropriate files in the appropriate directory before the deadline
of a particular coursework.
*)
// 1) Define a record type with the name FileMetaData representing the name
// of the file and the size of it.
// 2) Make a function that takes a directory as input
// and produces a list of instances of the FileMetaData record type defined in Q 1.
// 3) Make a function called getFileMetadata of type string list -> FileMetaData list
// that takes a list of directories as strings and returns a list of FileMetaData records of
// all files contained in the directories. You are encouraged to use List.collect
// in the solution
// 4) Make a function that displays a histogram chart showing the distribution of
// the file sizes given a list of FileMetaData records.