Created
September 27, 2013 15:34
-
-
Save vinnitu/6730541 to your computer and use it in GitHub Desktop.
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
topic: ~INTRODUCTIONS () | |
?: () $$question = ? | |
u: (\[ _* \] _*) # grab params and main sentence | |
# sample sentence [ location:6 space:5 ] This is my input | |
# a param looks like location:100 | |
@0 = ^burst('_0 " ") # get all variable assigns as facts | |
loop | |
{ | |
$$tmp = first(@0subject) # pick off next param | |
_2 = ^burst($$tmp ":" ) # split word and value | |
_2 = ^join($ _2) # create variable | |
^_2 = _3 # do assignment onto variable | |
} | |
input('_1 $$question) | |
fail(sentence) # do sentence without params | |
u: (_*) _0 ^keep() ^repeat() | |
your position is ($x, $y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment