Skip to content

Commit

Permalink
working example
Browse files Browse the repository at this point in the history
  • Loading branch information
refaktor committed Feb 29, 2024
1 parent 5a83953 commit 1ce8d42
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions examples/contextplay/main.rye
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

mkcc 'todos
items: { }
trash: { }
add: fn1 { .append! 'items }
archive: fn1 { :x purge! { = x } 'items |append! 'trash }

add "work on A"
; display items
add "call CEO of B"
ccp

mkcc 'bookmarks
items: { }
add: fn1 { .append! 'items }
ccp

stats?: does {
bookmarks/items .length? |printv "Bookmarks: {}"
todos/items .length? |printv "ToDos: {}"
}

todo: fn1 { :x todos/add x }
done: fn1 { :x todos/archive x }

bookmark: fn1 { :x bookmarks/add x }
bookmark?: fn1 { :x filter bookmarks/items { .contains x } |display }
todos/add "call Jana"

todo?: does { display todos/items }

enter-console "Do your thing ..."

0 comments on commit 1ce8d42

Please sign in to comment.