Skip to content

Instantly share code, notes, and snippets.

@zkat
Last active August 29, 2015 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zkat/5176 to your computer and use it in GitHub Desktop.
Save zkat/5176 to your computer and use it in GitHub Desktop.
(defun preparse-adverbs (token-list) ;This is the worst way to handle this shit. Ever. Temporary. Very.
"Yoinks all the adverbs it recognizes out of a list.
MULTIPLE RETURN VALUES: The first adv it finds, and a token-list purified of this evil."
(if (> (length token-list) 1)
(let ((adverb (find-if #'adverb-p token-list)))
(if adverb
(let ((token-list (remove-if #'adverb-p token-list :count 1)))
(values adverb token-list))
(values adverb token-list)))
(values nil token-list)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment