<msiism>
I mean, I should somehow wrap so that I don't have to provide a hash as an argument.
s-liao has joined #racket
<msiism>
Also, I'm wondering whether there's any significant difference between a hash table and a list of pairs, actually.
<msiism>
The wrapping should probably be done by using `let` to make the hash within the function and then have an inner function `convert`or some such as the body of `let`.
s-liao3 has joined #racket
s-liao has quit [Ping timeout: 250 seconds]
<msiism>
Thinking about it more, this funtkion should probably rather be called something like `lines->hash`.
<msiism>
Or, maybe, the better approach would be to first create a list that alternaties between keys and values and then make a hash from that.
<msiism>
This way, list->hash can be kept more generic.
badkins has joined #racket
badkins has quit [Ping timeout: 240 seconds]
badkins has joined #racket
szkl has joined #racket
<jA_cOp>
msiism: make-hash already accepts a list of pairs, e.g. `(define text "one 1\ntwo 2\nthree 3")` and then `(make-hash (map string-split (port->lines (open-input-string text))))` gives `'#hash(("one" . ("1")) ("three" . ("3")) ("two" . ("2")))`
<msiism>
Oh, that's neat.
Algernon666 has joined #racket
msiism has left #racket [Konversation vaporized.]
Algernon91 has quit [Ping timeout: 256 seconds]
s-liao3 has quit [Quit: Client closed]
badkins has quit [Remote host closed the connection]
badkins has joined #racket
Algernon666 has quit [Read error: Connection reset by peer]
Algernon666 has joined #racket
skapata has joined #racket
skapata has quit [Changing host]
skapata has joined #racket
capfredf has joined #racket
badkins has quit [Remote host closed the connection]
capfredf has quit [Remote host closed the connection]
capfredf has joined #racket
capfredf has quit [Ping timeout: 246 seconds]
badkins has joined #racket
badkins has quit [Remote host closed the connection]
badkins has joined #racket
badkins has quit [Remote host closed the connection]
szkl has quit [Quit: Connection closed for inactivity]
badkins has joined #racket
capfredf has joined #racket
badkins has quit [Ping timeout: 246 seconds]
badkins has joined #racket
capfredf has quit [Ping timeout: 272 seconds]
badkins has quit [Ping timeout: 240 seconds]
lowak has quit [Quit: Bye! \o]
lowak has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 246 seconds]
Algernon666 has quit [Ping timeout: 250 seconds]
capfredf has joined #racket
ec has quit [Quit: ec]
capfredf has quit [Remote host closed the connection]