Created
April 7, 2011 19:12
-
-
Save TelegramSam/908468 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
ruleset a8x153 { | |
meta { | |
name "recursive action without function" | |
description << | |
Runs a recursive action without a function to create the recursive step. | |
Base case is handled by the nexta defaction conditional expression. | |
>> | |
author "Sam Curren" | |
logging off | |
} | |
dispatch { | |
} | |
global { | |
r = defaction(n){ | |
effect = defaction(x){ | |
notify("run", x); | |
}; | |
nexta = | |
n > 0 => | |
defaction(){ {effect(n); r(n-1);} } | | |
defaction(){ effect(n); }; | |
nexta(); | |
}; | |
} | |
rule run { | |
select when pageview ".*" setting () | |
r(3); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment