2.74 Структуры данных в подразделениях компании Insatiable Enterprises, Inc
|
Had to replace in my code in order to run tests:
true -> #t
false -> #f
nil -> '()
Which is not exactly according to Scheme lang as described in the book |
2025-01-03 |
2.79 Обобщенный предикат равенства equ?
|
'install-rational-package' should export 'numer' and 'denom', which are to be used by update procedure (direct access to parts of rational number is possible, but requires knowledge on internal structure) |
2025-01-03 |
3.5 Интегрирование методом Монте-Карло
|
Bug in test. Must use 'and' instead of 'or':
(check-true (and (>= attempt 30.0) (<= attempt 32.0))) |
2025-01-09 |
3.18 Определите наличие цикла в списке
|
Using mlists and re-defining cdr (totally unnecessary) really muddies water here. Attempt to use 'normal' lists leads to unexpected behaviour |
2025-01-10 |
2.82 Общий случай привидения с несколькими аргументами
|
Same thought |
2025-01-11 |
3.50 Обобщение stream-map
|
Using procs provided in tests makes implementation of stream-map consistent with the book, but also makes it actually calculate the whole list provided (at the moment when stream-map is applied, NOT when you try to access the resulting stream). It happens because cons-stream will calculate its arguments unlike the original stream-cons from racket library |
2025-01-23 |
3.52 Значение sum
|
This is a great example of pointless academic exercise. How would it make anyone a better programmer?? |
2025-01-23 |
3.58 Интерпретация потока
|
Another exercise with no value |
2025-01-24 |
3.74 Переходы входного сигнала через ноль
|
There is a bug in tests here. They contradict the description from the book. When signal changes from positive to negative there must be -1, tests require 1. And the same problem for the opposite situation. |
2025-02-03 |
3.81 Поток случайных чисел
|
Those tests imply a rather questionable implementation of the proc. Why the streams cannot just fully match |
2025-02-06 |