Skip to content

Instantly share code, notes, and snippets.

@Arnot
Last active December 4, 2017 13:47
Show Gist options
  • Select an option

  • Save Arnot/344620d8ac8eab5f1b9f8f330eec4afe to your computer and use it in GitHub Desktop.

Select an option

Save Arnot/344620d8ac8eab5f1b9f8f330eec4afe to your computer and use it in GitHub Desktop.
(defun aoc-day3-1 (input)
(let ((num-correct-passphrases 0))
(dolist (passphrase input)
(let ((words (split-string passphrase " ")))
(when (= (length words)
(length (delete-dups words)))
(incf num-correct-passphrases))))
num-correct-passphrases))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment