diff --git a/extra/morse/morse-tests.factor b/extra/morse/morse-tests.factor index c87fa483e3..dabb93579d 100644 --- a/extra/morse/morse-tests.factor +++ b/extra/morse/morse-tests.factor @@ -10,4 +10,4 @@ USING: arrays morse strings tools.test ; [ "morse code" ] [ "-- --- .-. ... . / -.-. --- -.. ." morse> ] unit-test [ "hello, world!" ] [ "Hello, World!" >morse morse> ] unit-test [ ] [ "sos" 0.075 play-as-morse ] unit-test -[ ] [ "Factor rocks!" 0.05 play-as-morse ] unit-test +[ ] [ "Factor rocks!" play-as-morse ] unit-test diff --git a/extra/morse/morse.factor b/extra/morse/morse.factor index d0b9e4003a..ecade14cdb 100644 --- a/extra/morse/morse.factor +++ b/extra/morse/morse.factor @@ -167,8 +167,10 @@ SYMBOLS: source dot-buffer dash-buffer intra-char-gap-buffer letter-gap-buffer ; PRIVATE> -: play-as-morse ( str unit-length -- ) +: play-as-morse* ( str unit-length -- ) [ [ letter-gap ] [ ch>morse play-char ] interleave ] swap playing-morse ; +: play-as-morse ( str -- ) + 0.05 play-as-morse* ;