Skip to content

Instantly share code, notes, and snippets.

@joshcough
Last active August 29, 2015 14:17
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 joshcough/e2e98d6c76431550f1ed to your computer and use it in GitHub Desktop.
Save joshcough/e2e98d6c76431550f1ed to your computer and use it in GitHub Desktop.
go f pe@(PrimE p) = go (unvar (args !!) f) y where
v = Variable
args :: [Variable]
args = primVars p
y :: L5.E (Var Int a)
y = Lambda [v "x", v "y"] (abstract (^? _B) (App (PrimE p) [Var (B 0), Var (B 1)]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment