From 2862843a9bd435a6c4610134619e375aa7295a70 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 26 Apr 2009 14:43:06 -0500 Subject: [PATCH] better fix for morse --- extra/morse/morse.factor | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/extra/morse/morse.factor b/extra/morse/morse.factor index 20989f2f2f..ddfd3c2042 100644 --- a/extra/morse/morse.factor +++ b/extra/morse/morse.factor @@ -3,7 +3,7 @@ USING: accessors ascii assocs biassocs combinators hashtables kernel lists literals math namespaces make multiline openal parser sequences splitting strings synth synth.buffers ; IN: morse -ERROR: no-morse-code ch ; +ERROR: no-morse-ch ch ; @@ -76,7 +76,7 @@ CONSTANT: morse-code-table $[ ] : ch>morse ( ch -- morse ) - ch>lower morse-code-table at unknown-char or ; + ch>lower morse-code-table at unknown-char 1string or ; : morse>ch ( str -- ch ) morse-code-table value-at char-gap-char or ; @@ -156,7 +156,8 @@ CONSTANT: beep-freq 880 { dot-char [ dot ] } { dash-char [ dash ] } { word-gap-char [ intra-char-gap ] } - [ drop intra-char-gap ] + { unknown-char [ intra-char-gap ] } + [ no-morse-ch ] } case ] interleave ;