Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion labs/lab02.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ frequencies in English alphabet [Wikipedia](https://en.wikipedia.org/wiki/Letter

## Task 1
Write a function `(average-list lst)` taking a list of numbers `lst` and returning their
arithmetical average. E.g. `(average-lst '(1 2 3)) => 2`. The function should be tail-recursive.
arithmetical average. E.g. `(average-list '(1 2 3)) => 2`. The function should be tail-recursive.

**Hint:** As the function should be tail-recursive, it has to use an accumulator storing a partial
sum of elements from the list. Finally, the resulting sum is divided by the number of all elements
Expand Down