Skip to content

Instantly share code, notes, and snippets.

@bond15
Last active August 27, 2021 23:55
Show Gist options
  • Save bond15/1d7bb7f3a7287deac399786cce81715f to your computer and use it in GitHub Desktop.
Save bond15/1d7bb7f3a7287deac399786cce81715f to your computer and use it in GitHub Desktop.
Not Python
data Python : Set where
def_⦅_⦆⦂_ : {A B : Set} → A → B → Python → Python
for_in̂_⦂_ : {A B : Set} → A → B → Python → Python
if_⦂_ : Python → Python → Python
if_⦂_else⦂_ : Python → Python → Python → Python
_≕_ : {A B : Set} → A → B → Python
return_ : {A : Set} → A → Python
foo : {A B C D E : Set} → A → B → C → D → E → Python
foo a b c d e = def a ⦅ b ⦆⦂
for a in̂ b ⦂
if (c ≕ d) ⦂
return e
else⦂
return b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment