Skip to content

Commit f9925ae

Browse files
eriksvedangErik Svedäng
andauthored
fix: Make guessing game example work again (trim input). (carp-lang#1533)
* fix: Make guessing game example work again (trim input). * fix: Whitespace --------- Co-authored-by: Erik Svedäng <erik@Behemoth-II.local>
1 parent b44b090 commit f9925ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/guessing_game.carp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
(Random.seed-from (Double.from-int (System.time)))
4343
(start-new-game!)
4444
(while guessing
45-
(let [user-input (get-line)
45+
(let [user-input (String.trim &(get-line))
4646
guessed-num (from-string &user-input)]
4747
(if (= &user-input "q\n")
4848
(exit!)

0 commit comments

Comments
 (0)