> 1) At least one of the fields must be set at creation
>
What does it mean for one of the fields not to be set at creation? Is there
implicitly some not-initialized value like #f that is also valid for the
constructor? Do you want your accessor functions to raise an error if
someone tries to acce
In my code, I started experimenting with using immutable structs and
"updating" them using 'struct-copy'. I had to write my own "update"
functions, but I was surprised at how elegant the resulting code was. I
believe (although I did not check) that the guard function is invoked every
time a
I have a struct that looks like this (simplified for concision):
(struct db-chunk (scratchdir-path chunkdir-path) #:mutable)
I'd like to ensure that:
1) At least one of the fields must be set at creation
2) Both fields will accept only a path-string? value
3) Both fields will return string? when
As an example, this prints twoonethree:
#lang scribble/base
@(printf "one")
@(printf foo)
@(define foo (begin (printf "two") "three"))
Context: I'm using Scribble to generate an exam, and I have some uses of
(set-random-seed) on the first few lines to set state for shuffling
question order la
Regarding submod testing, would it make sense to have a submod* form that
recursively imports? I've recently become a fan of this approach to testing
inner procedures but it seems to require both (submod "." ) (submod
"." test), or maybe a version that specifically imports all tests
recursively.
5 matches
Mail list logo