Skip to content

Instantly share code, notes, and snippets.

@jFransham
Created June 3, 2016 09:21
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 jFransham/c9b573a0a7e5442b055a27427ec78220 to your computer and use it in GitHub Desktop.
Save jFransham/c9b573a0a7e5442b055a27427ec78220 to your computer and use it in GitHub Desktop.
$def is_even:a (
$def is_even_internal: counter even
$if counter
is_even_internal: sub: counter 1 not:even
even;
is_even_internal: a 1
);
$def ?a $if a "yes" "no";
print:"Is 8 even?";
print:?is_even:8;
print:"Is 7 even?";
print:?is_even:7;
print:"Is 127 even?";
print:?is_even:127
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment