- 3 Posts
- 4 Comments
Joined 1 year ago
Cake day: February 12th, 2025
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
SOLUTION: The log file is definitely changing the case of the variables as they appear in .conf 😅.
appleberry@aussie.zoneOPto
Learn Programming•Why are "make-" expressions truncated in DrRacket test results and failing?English
1·10 months agohttps://docs.racket-lang.org/guide/define-struct.html#(part._trans-struct) Making the structs transparent seems to be a better work-around for now.
appleberry@aussie.zoneOPto
Learn Programming•Why are "make-" expressions truncated in DrRacket test results and failing?English
2·10 months agoI appreciate the effort! Further to this, I seems like if I change my function and the expected result to compare lists instead of ‘make-ta’ they pass!
(check-expect (sub-slot 1 SOBA) (make-ta "Soba" 1 (list 3))) ; subtract one shift <--- FAIL (check-expect (sub-slot 3 SOBA) (make-ta "Soba" 1 (list 1))) ; subtract a different shift <--- FAIL (define (sub-slot slot ta) (cond [(and (> (ta-max ta) 0) (> (length (ta-avail ta)) 1)) (make-ta (ta-name ta) (sub1 (ta-max ta)) (remq slot (ta-avail ta)))] [else empty]))(check-expect (sub-slot 1 SOBA) (make-ta "Soba" 1 (list 3))) ; subtract one shift <--- FAIL (check-expect (sub-slot 3 SOBA) (list "Soba" 1 (list 1))) ; subtract a different shift <--- PASS (define (sub-slot slot ta) (cond [(and (> (ta-max ta) 0) (> (length (ta-avail ta)) 1)) (list (ta-name ta) (sub1 (ta-max ta)) (remq slot (ta-avail ta)))] [else empty]))This is the final problem of the course 😅. I’m going to try and get to the bottom of this rather than work around with lists (which is what I did last time). I must have some misunderstanding with make- functions…


Thanks. I did create a persistent volume, but I thought that deleting the files would trigger them to be recreated when the container restarts.