samth
2020-10-27 13:05:03

Yes, you can add that word and use deftech


mflatt
2020-10-27 13:25:47

Or use index, which doesn’t require that reservoir shows up in the text.


chansey97
2020-10-27 17:02:57

Is there a way to get recent value in Racket’s REPL? For example, in common lisp, we can do this in REPL: CL-USER> (+ 1 2) 3 CL-USER> * 3


sorawee
2020-10-27 17:29:31

If you use the REPL in the command-line, yes. See https://docs.racket-lang.org/xrepl/index.html#%28part._past-vals%29


sorawee
2020-10-27 17:29:52

It’s not supported in DrRacket though.


samdphillips
2020-10-27 17:31:06

For some reason I thought xrepl didn’t do that.


chansey97
2020-10-27 17:46:44

@sorawee Thanks.


wanpeebaw
2020-10-28 01:57:38

After some experiments, I got this version. And I’m quite satisfied. (require math/number-theory data/collection threading fancy-app) (~>> (in-naturals 1) (map sqr) (filter (divides? 4 _)) (take 5) (for-each displayln))


wanpeebaw
2020-10-28 03:05:17

Then I found sweet-exp, which allows me to strip nearly all parentheses and form the code into a tree structure, just like markdown syntax. It’s visually cleaner. ~>> in-naturals 1 map sqr filter (divides? 4 _) take 5 for-each displayln