Skip to content

Instantly share code, notes, and snippets.

@taylskid
Created November 26, 2020 15:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taylskid/fcd2a8677b7b52e1f21800e8b2403639 to your computer and use it in GitHub Desktop.
Save taylskid/fcd2a8677b7b52e1f21800e8b2403639 to your computer and use it in GitHub Desktop.
;; -*- Gerbil -*-
(export ~> ~>>)
(defrules ~> ()
((_ x) x)
((_ x (f a_1 ...)) (f x a_1 ...))
((_ x f) (~> x (f)))
((_ x e e1 ...) (~> (~> x e) e1 ...)))
(defrules ~>> ()
((_ x) x)
((_ x (f a_1 ...)) (f a_1 ... x))
((_ x f) (~>> x (f)))
((_ x e e1 ...) (~>> (~>> x e) e1 ...)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment