diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-02-23 16:51:24 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-02-23 16:51:24 -0800 |
commit | 9188a8d5c0c8efe78333274116b36a0486814a36 (patch) | |
tree | ed649437db072d4f3ca23baa3e42141df4bdbc9a | |
parent | 29c006d6a47e9e0d5a7943efb9102b233be95e79 (diff) | |
download | mu-9188a8d5c0c8efe78333274116b36a0486814a36.tar.gz |
2695 - todo for recipe variables
Basically I need to make these tests work: - Test 1: specializing while saving shape-shifting recipe literal recipe f a:address:shared:_elem -> b:address:shared:_elem [ local-scope load-ingredients reply a ] recipe main [ local-scope {x: (recipe (address shared number) -> (address shared number))} <- copy f y:address:shared:number <- new number:type *y <- copy 34 z:address:shared:number <- call x, y $print *z, 10/newline ] - Test 2: passing recipe literal to higher-order recipe recipe g x:address:shared:number, {h: (recipe (address shared number) -> (address shared number))} -> y:address:shared:number [ local-scope load-ingredients y <- call f, x ] recipe main [ local-scope x:address:shared:number <- new number:type *x <- copy 34 y:address:shared:number <- g x, f $print *y, 10/newline ]
-rw-r--r-- | 061recipe.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/061recipe.cc b/061recipe.cc index 7c1b3d05..39778426 100644 --- a/061recipe.cc +++ b/061recipe.cc @@ -1,6 +1,8 @@ //: So far we've been calling a fixed recipe in each instruction, but we'd //: also like to make the recipe a variable, pass recipes to "higher-order" //: recipes, return recipes from recipes and so on. +//: +//: todo: support storing shape-shifting recipes into recipe variables and calling them :(scenario call_literal_recipe) recipe main [ |