Skip to content

Commit

Permalink
Add a complex example, remember-favorite-things. It shows off using t…
Browse files Browse the repository at this point in the history
…he associative memory.

Part of #36.
  • Loading branch information
jkomoros committed Jul 4, 2023
1 parent e0b97aa commit 84d6e99
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions seeds/example-complex.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,51 @@
{
"version": 0,
"seeds": {
"remember-favorite-things": {
"type": "let",
"name": "memory",
"value": "komoroske.com:favorite_things",
"block": {
"type": "let",
"id": "ask-favorite-thing",
"name": "komoroske.com:new_favorite_thing",
"value": {
"type": "input",
"question": "Enter a favorite thing, or hit Enter if done"
},
"block": {
"type": "if",
"test": {
"type": "==",
"a": {
"type": "var",
"name": "komoroske.com:new_favorite_thing"
},
"b": ""
},
"then": {
"type": "log",
"value": "OK, done adding favorite things."
},
"else": {
"type": "array",
"return": "last",
"items": [
{
"type": "memorize",
"value": {
"type": "var",
"name": "komoroske.com:new_favorite_thing"
}
},
{
"id": "ask-favorite-thing"
}
]
}
}
}
},
"name-limerick":{
"type": "prompt",
"prompt": {
Expand Down

0 comments on commit 84d6e99

Please sign in to comment.