Created
July 20, 2017 05:23
-
-
Save joemfb/b2eb9b1b6a8ea6a6663c90c8200391e0 to your computer and use it in GitHub Desktop.
testing ;~ expansions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!: :- %say |= * :- %noun | |
=/ one | |
|*({a/gate b/gate} [;~(a b) b]) | |
=/ two | |
|* {a/gate b/gate c/gate} | |
:- ;~(a b c) | |
|* arg/* | |
(a (b arg) c(,.+6 arg)) | |
=/ tre | |
|* {a/gate b/gate c/gate d/gate} | |
:- ;~(a b c d) | |
|* arg/* | |
%+ a (b arg) | |
=+ arg=arg | |
|% +- $ (a (c arg) d(,.+6 arg)) -- | |
:: |* shadow/_arg | |
:: (a (c shadow) d(,.+6 shadow)) | |
=/ bunt |*({a/* b/gate} [%bunt a (b)]) | |
=/ glue |*({a/* b/gate} [%glue a (b a)]) | |
:~ :+ %one | |
%- test [(- "foo") (+ "foo")]:(one bunt crip) | |
%- test [(- "foo") (+ "foo")]:(one glue crip) | |
:+ %two | |
%- test [(- "foo") (+ "foo")]:(two bunt crip some) | |
%- test [(- "foo") (+ "foo")]:(two glue crip dec) | |
:+ %tre | |
%- test [(- "foo") (+ "foo")]:(tre bunt crip some head) | |
%- test [(- "foo") (+ "foo")]:(tre glue crip dec trip) | |
== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment