diff options
| author | Omar Rizwan <omar@omar.website> | 2022-03-16 07:44:11 +0000 |
|---|---|---|
| committer | Omar Rizwan <omar@omar.website> | 2022-03-16 07:44:11 +0000 |
| commit | c31c19676b3433697c1af147457d2df989059d83 (patch) | |
| tree | 44c0cb8459d3126c5ee5d422b2212938b2d53042 /folk.tcl | |
| parent | start refactoring reactive core (diff) | |
| download | folk-c31c19676b3433697c1af147457d2df989059d83.tar.gz folk-c31c19676b3433697c1af147457d2df989059d83.zip | |
more refactoring. inner When doesn't work
Diffstat (limited to 'folk.tcl')
| -rw-r--r-- | folk.tcl | 34 |
1 files changed, 12 insertions, 22 deletions
@@ -18,11 +18,7 @@ proc When {args} { lappend ::whens [list $clause $cb] } -proc Top {cb} { - # you can't run Claim/When/etc outside a valid Folk context -- - # this is a root context so you can hardcode stuff - -} +# TODO: top/prelude/boot context ? proc runWhen {clause cb match} { dict with match $cb @@ -68,20 +64,6 @@ proc frame {} { } } -# Top { -# Claim the fox is out -# Claim the dog is out - -# When the /animal/ is out { -# puts "there is a $animal out there somewhere" -# Claim the $animal is around - -# When the /animal/ is around { -# puts "hello $animal" -# } -# } -# } - # we want to be able to asynchronously receive statements # we want to be able to asynchronously share statements(?) proc accept {chan addr port} { @@ -127,14 +109,22 @@ after 0 { Step {} } after 200 { Step { - puts assume1 - Wish rectangle blue + puts Step1 + Claim the fox is out + Claim the dog is out + When the /animal/ is out { + When the /animal/ is around { + puts "the $animal is around" + } + puts "there is a $animal out there somewhere" + Claim the $animal is around + } } } after 400 { Step { - puts assume2 + puts Step2 Wish rectangle orange } } |
