Skip to content

Instantly share code, notes, and snippets.

@pathammer
Created October 24, 2019 20:55
Show Gist options
  • Save pathammer/a8bcafc8e9fa8aa7eb0fc1aab65392af to your computer and use it in GitHub Desktop.
Save pathammer/a8bcafc8e9fa8aa7eb0fc1aab65392af to your computer and use it in GitHub Desktop.
Parse list of pairs of numbers from STDIN, useful for parsing hackerrank.com quiz input
(def pairs (for [_ (range numPairs)]
(map #(Integer/parseInt %) (re-seq #"[-\d.]+" (read-line)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment