capitalex / tables-with-var-pass.nv
0 лайк(-ов)
0 форк(-ов)
3 файл(-ов)
Последняя активность 1 year ago
| 1 | |#variables| |
| 2 | , @table id, @table row, @table size |
| 3 | , pretty print rows iterator, pretty print row index |
| 4 | |
| 5 | |
| 6 | |_| Define our tables |
| 7 | |#table, singles| |
| 8 | , 1st |
| 9 | |
| 10 | |#table, doubles| |
capitalex / linear-multiset-catlang.txt
0 лайк(-ов)
0 форк(-ов)
3 файл(-ов)
Последняя активность 1 year ago
| 1 | |
| 2 | function run_rules(state) |
| 3 | if state["flour"] >= 1 and state["sugar"] >= 1 and state["apples"] >= 1 then |
| 4 | emit(state, "apple cake") |
| 5 | return run_rules(state) |
| 6 | elseif state["apples"] >= 1 and state["oranges"] >= 1 and state["cherries"] >= 1 then |
| 7 | emit(state, "fruit salad") |
| 8 | return run_rules(state) |
| 9 | elseif state["fruit salad"] >= 1 and state["apple cake"] >= 1 then |
| 10 | emit(state, "fruit cake") |