diff options
author | Guillermo Ramos | 2012-05-05 15:29:48 +0200 |
---|---|---|
committer | Guillermo Ramos | 2012-05-05 15:29:48 +0200 |
commit | 83054326eb51ea73a8078a1e7feefae88107c3db (patch) | |
tree | 83ef7d340fa261cceb4d0156bff2bb2ec32a4256 /io/coroutine.io | |
parent | 8ae4691e677414843cf3a84d4327d303fe3e2f41 (diff) | |
download | 7l-83054326eb51ea73a8078a1e7feefae88107c3db.tar.gz |
[Io] Día 3
Diffstat (limited to 'io/coroutine.io')
-rw-r--r-- | io/coroutine.io | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/io/coroutine.io b/io/coroutine.io new file mode 100644 index 0000000..8c9d743 --- /dev/null +++ b/io/coroutine.io @@ -0,0 +1,20 @@ +vizzini := Object clone +vizzini talk := method( + "Fezzik, are there rocks ahead?" println + yield + "No more rhymes now, I mean it." println + yield +) + +fezzik := Object clone +fezzik rhyme := method( + yield + "If there are, we'll all be dead." println + yield + "Anybody want a peanut?" println +) + +vizzini @@talk +fezzik @@rhyme + +Coroutine currentCoroutine pause |