
@panduwana has joined the channel

I tried with this : (define (replace-ment lst indices with)
(let iter ((lst lst)
(indices indices)
(index 0))
(cond
[(empty? lst) empty]
[(empty? indices) lst]
[(equal? index (car indices))
(iter (cons with (cdr lst))
(cdr indices)
(+ 1 index))]
[else
(iter (cdr lst)
(cdr indices)
(+ 1 index))])))

So here’s the thing I was working on that occasioned my question about enumerations yesterday (I figured it out): https://twitter.com/joeld/status/1370770153336627201

Would you mind sharing the code?

I do plan to! It’ll be on <https://github.com/otherjoel|my GitHub profile> at some point and I may do a little post at https://the\|https://the http://notepad.com\|notepad.com

I think the next step is to make it smarter about semantics: the ability to specify each word as a noun, adjective etc so it can build up more poetic variations

Is there also a way to enter a submodule? For example, I can enter a module file task.rkt
with ,enter task.rkt
. Now I want to enter the test
submodule (defined with module+
) in the task.rkt
module.
I tried the “obvious” ,enter test
after ,enter task.rkt
, but I get the message ,enter: unknown module: test
.
I also tried several web searches, but didn’t find anything useful.

This works (and answers my question). :-) $ racket
> ,enter (submod "task.rkt" test)
... test run output ...
"task.rkt"> test-sorting
#<procedure:test-sorting>
I arrived at this answer by reading https://docs.racket-lang.org/reference/require.html and trying the combination of submod
from there with ,enter
in the REPL.

Does DrRacket have a place where it creates compiled
directories other than right next to the source files?

You can direct it to a different place with current-compiled-file-roots
or PLTCOMPILEDROOTS
.

Thanks, Matthew. Those aren’t ever configured automatically when someone installs, right?