xgqtd has joined #racket
s-liao has quit [Ping timeout: 256 seconds]
rgherdt has quit [Ping timeout: 256 seconds]
s-liao has joined #racket
capfredf has joined #racket
capfredf has quit [Ping timeout: 264 seconds]
s-liao has quit [Ping timeout: 256 seconds]
abrantesasf has quit [Remote host closed the connection]
Psybur has quit [Remote host closed the connection]
to-hu has quit [Remote host closed the connection]
s-liao has joined #racket
winny has quit [Ping timeout: 276 seconds]
winny has joined #racket
countvajhula has joined #racket
vraid has quit [Ping timeout: 260 seconds]
med has quit [Ping timeout: 260 seconds]
med has joined #racket
dbohdan3 has joined #racket
dbohdan has quit [Ping timeout: 260 seconds]
energizer has quit [Ping timeout: 260 seconds]
s-liao has quit [Quit: Client closed]
energizer has joined #racket
s-liao has joined #racket
tyson2 has quit [Remote host closed the connection]
countvajhula has quit [Ping timeout: 260 seconds]
countvajhula has joined #racket
countvajhula has quit [Remote host closed the connection]
countvajhula has joined #racket
countvajhula has quit [Remote host closed the connection]
countvajhula has joined #racket
countvajhula has quit [Remote host closed the connection]
countvajhula has joined #racket
ur5us has quit [Ping timeout: 264 seconds]
capfredf has joined #racket
capfredf has quit [Ping timeout: 256 seconds]
Jing has joined #racket
shicz1 has quit [Ping timeout: 268 seconds]
shicz1 has joined #racket
skapata has quit [Quit: Ĝis.]
shicz1 has quit [Ping timeout: 268 seconds]
shicz1 has joined #racket
shicz2 has joined #racket
shicz1 has quit [Ping timeout: 256 seconds]
s-liao has quit [Ping timeout: 256 seconds]
capfredf has joined #racket
s-liao has joined #racket
capfredf has quit [Ping timeout: 260 seconds]
shicz2 has quit [Ping timeout: 268 seconds]
shicz2 has joined #racket
s-liao has quit [Ping timeout: 256 seconds]
to-hu has joined #racket
kenran has joined #racket
rgherdt has joined #racket
countvajhula has quit [Ping timeout: 256 seconds]
countvajhula has joined #racket
to-hu has quit [Ping timeout: 268 seconds]
hendursa1 has joined #racket
hendursaga has quit [Ping timeout: 276 seconds]
shicz2 has quit [Ping timeout: 260 seconds]
shicz2 has joined #racket
hendursa1 has quit [Remote host closed the connection]
hendursa1 has joined #racket
shicz2 has quit [Ping timeout: 256 seconds]
shicz2 has joined #racket
Guest4382 has quit [Remote host closed the connection]
gproto23 has joined #racket
Avichi has joined #racket
Avichi has quit [Ping timeout: 256 seconds]
ski has quit [Ping timeout: 260 seconds]
ski has joined #racket
notzmv has quit [Ping timeout: 264 seconds]
notzmv has joined #racket
Codaraxis has quit [Ping timeout: 268 seconds]
shicz2 has quit [Ping timeout: 268 seconds]
shicz2 has joined #racket
vraid has joined #racket
countvajhula has quit [Ping timeout: 260 seconds]
to-hu has joined #racket
vraid has quit [Quit: Leaving]
countvajhula has joined #racket
countvajhula has quit [Ping timeout: 264 seconds]
countvajhula has joined #racket
capfredf has joined #racket
capfredf has quit [Ping timeout: 268 seconds]
countvajhula has quit [Ping timeout: 256 seconds]
countvajhula has joined #racket
countvajhula has quit [Remote host closed the connection]
countvajhula has joined #racket
countvajhula has quit [Remote host closed the connection]
countvajhula has joined #racket
countvajhula has quit [Ping timeout: 268 seconds]
countvajhula has joined #racket
tyson2 has joined #racket
countvajhula has quit [Ping timeout: 264 seconds]
countvajhula has joined #racket
countvajhula has quit [Remote host closed the connection]
countvajhula has joined #racket
countvajhula has quit [Ping timeout: 268 seconds]
shicz2 has quit [Ping timeout: 260 seconds]
shicz2 has joined #racket
countvajhula has joined #racket
countvajhula has quit [Ping timeout: 268 seconds]
sudden has joined #racket
sudden has quit [Changing host]
sudden has joined #racket
capfredf has joined #racket
capfredf has quit [Ping timeout: 268 seconds]
countvajhula has joined #racket
countvajhula has quit [Ping timeout: 268 seconds]
kenran has quit [Quit: WeeChat info:version]
s-liao has joined #racket
dpk has quit [Ping timeout: 260 seconds]
dpk has joined #racket
tyson2 has quit [Remote host closed the connection]
sudden has quit [Quit: leaving]
countvajhula has joined #racket
countvajhula has quit [Ping timeout: 268 seconds]
sudden has joined #racket
sudden has quit [Changing host]
sudden has joined #racket
gproto23 has quit [Remote host closed the connection]
X-Scale has quit [Ping timeout: 268 seconds]
X-Scale` has joined #racket
countvajhula has joined #racket
Avichi has joined #racket
X-Scale` has quit [Ping timeout: 256 seconds]
shicz2 has quit [Ping timeout: 264 seconds]
X-Scale has joined #racket
countvajhula has quit [Ping timeout: 260 seconds]
skapata has joined #racket
skapata has quit [Changing host]
skapata has joined #racket
countvajhula has joined #racket
VIVIT has joined #racket
shicz2 has joined #racket
countvajhula has quit [Ping timeout: 268 seconds]
s-liao has quit [Quit: Client closed]
skapata has quit [Ping timeout: 268 seconds]
skapata has joined #racket
skapata has quit [Changing host]
skapata has joined #racket
tyson2 has joined #racket
countvajhula has joined #racket
countvajhula has quit [Ping timeout: 268 seconds]
Jing has quit [Remote host closed the connection]
countvajhula has joined #racket
Jing has joined #racket
Jing has quit [Remote host closed the connection]
Jing has joined #racket
countvajhula has quit [Ping timeout: 256 seconds]
tyson2 has quit [Remote host closed the connection]
capfredf has joined #racket
shicz2 has quit [Ping timeout: 256 seconds]
shicz2 has joined #racket
_________ has quit [Ping timeout: 252 seconds]
_________ has joined #racket
tyson2 has joined #racket
capfredf has quit [Remote host closed the connection]
capfredf has joined #racket
capfredf has quit [Ping timeout: 268 seconds]
gproto23 has joined #racket
countvajhula has joined #racket
countvajhula has quit [Remote host closed the connection]
countvajhula has joined #racket
Avichi has quit [Quit: Client closed]
countvajhula has quit [Ping timeout: 268 seconds]
countvajhula has joined #racket
countvajhula has quit [Ping timeout: 264 seconds]
countvajhula has joined #racket
countvajhula has quit [Remote host closed the connection]
countvajhula has joined #racket
capfredf has joined #racket
jmiven has quit [Quit: reboot]
capfredf has quit [Ping timeout: 268 seconds]
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #racket
ur5us has joined #racket
vraid has joined #racket
ur5us has quit [Remote host closed the connection]
ur5us has joined #racket
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #racket
ec has joined #racket
shicz2 has quit [Ping timeout: 268 seconds]
shicz2 has joined #racket
ur5us has quit [Ping timeout: 260 seconds]
tyson2 has quit [Remote host closed the connection]
gproto23 has quit [Remote host closed the connection]
ecraven- has joined #racket
even4voi- has joined #racket
ecraven has quit [Ping timeout: 246 seconds]
kadoban has quit [Ping timeout: 246 seconds]
whitequark has quit [Ping timeout: 246 seconds]
even4void has quit [Ping timeout: 268 seconds]
undltd has quit [Ping timeout: 264 seconds]
kadoban has joined #racket
whitequark has joined #racket
undltd has joined #racket
capfredf has joined #racket
<undltd> How would one write a contract for a function that accepts any number of arguments in pairs, similar to `hash` (but such that key is always a symbol)?
<undltd> So the number of arguments must be even and all the odd arguments must be symbols
capfredf has quit [Ping timeout: 268 seconds]
countvajhula has quit [Ping timeout: 268 seconds]
apg has joined #racket
<mfiano> You mean the even arguments.
<undltd> mfiano: depends on how we are counting the arguments :) Somehow I tend to count function arguments from 1
<mfiano> (foo 'k0 1 'k2 3 ...)
<undltd> yes!
<undltd> So calling foo as `(foo 'a #t 'b #t 'c)` would result in a contract error
<mfiano> I am a Racket newbie, but with 20 years of Lisp experience, so someone else might be able to answer better.
monkey_ has joined #racket
<mfiano> That said, I would write a predicate function that first extracts the keys and binds them to `let variable` with (filter even? args)
<mfiano> Then check that the length of (mapand symbol? keys) is half the length of the original list
<mfiano> or something
<undltd> thanks
countvajhula has joined #racket
<mfiano> I wasn't thinking above. (filter even? args) is wrong, as we want the even indices, not values.
<mfiano> I don't know the standard functions well enough to be able to translate the answer from the Lisp I know, sorry
<undltd> I get the idea though
VIVIT has quit [Remote host closed the connection]
<mfiano> This could be done in O(n) time, with a clever enough function.
VIVIT has joined #racket
VIVIT has quit [Quit: Connection closed]
tyson2 has joined #racket
capfredf has joined #racket
capfredf has quit [Remote host closed the connection]
capfredf has joined #racket
monkey_ has quit [Remote host closed the connection]
monkey_ has joined #racket
capfredf has quit [Ping timeout: 256 seconds]
ec has quit [Remote host closed the connection]
ec has joined #racket
monkey_ has quit [Remote host closed the connection]