Skip to content

Instantly share code, notes, and snippets.

@paytonrules
Last active December 7, 2016 01:42
Show Gist options
  • Save paytonrules/aff7a189a57baed14618c065b82d7bfa to your computer and use it in GitHub Desktop.
Save paytonrules/aff7a189a57baed14618c065b82d7bfa to your computer and use it in GitHub Desktop.

Mutli-arity function definitions:

You use the "regex" functions. s/? Will say "0 or 1 of this" - so in the spec below 0 or 1 offsets is required.

(s/fdef create
        :args (s/cat
                :character ::character
                :offset (s/? ::offset))
        :ret ::invader)

Return Values

Are not checked without test.check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment