@iontab06 has joined the channel
Hello, I’am trying to extract 3th element from a list using split-at > (split-at ’(1 2 3 4 5 6) 3) ’(1 2 3) ’(4 5 6) Now, from the first list I want last element, but using ‘first’ before ‘split-at’ give me some errors > (first (split-at ’(1 2 3 4 5 6) 3)) . . result arity mismatch; expected number of values not received expected: 1 received: 2 values…: Can anyone point me to the right direction? The two lists returned by ‘split-at’ aren’t ‘regular’ lists ?
@iontab06 split-at
returns two values, which you can bind using define-values
. See here: https://docs.racket-lang.org/guide/define.html#%28part._multiple-values%29
Though if it’s just that element you want, you may prefer list-ref
.
@lexi.lambda Many thanks! list-ref is what I need ; define-values will also be useful, I now understand how it works. Thank you!
@hunter has joined the channel
:wave:
hi
howdy
In Clj-land a lot of people use https://github.com/tpope/vim-fireplace I’ve been digging around for a similar repl for vim Racket users, but it seems like opening up your file in DrRacket and pressing run is the recommended approach at this time? Noob here…
Is there a way to capture keypresses of the alt or capslock or windows keys in on-key handler of a big bang program? Or if not with universe, is there a easily swappable alternative which might accomplish this? Lux? Basically I need at least one more meta key beyond shift and control. Relatedly, is there a canonical way to debounce keys you’re using ad modifiers? Like, I can use shift as a modifier and it works fine, but my logs are getting polluted with superfluous shifts. I could just clean these up after the fact, but it feels dirty.
Oh and also… When using big-bang/to-draw with 2htdp/image, the windowed output always has a thin white border between the drawing area and the window border. Is there a way to get rid of this margin/padding?