retroforth/example/is-pangram.forth
crc b07f8a82f6 initial draft of a pangram checker
FossilOrigin-Name: eff99290b7fbced8e754a6b45005a8d860339158ddf22907ee1483712ea72c57
2017-10-22 19:04:31 +00:00

14 lines
367 B
Forth

~~~
{{
'abcdefghijklmnopqrstuvwxyz 'FULL s:const
'__________________________ 'TEST s:const
---reveal---
:s:pangram? (s-f)
'__________________________ &TEST #26 copy
s:to-lower [ c:letter? ] s:filter [ dup $a - &TEST + store ] s:for-each
&TEST &FULL s:eq? ;
}}
~~~
'Hello_world! s:pangram?
'The_quick_brown_fox_jumped_over_the_lazy_dogs. s:pangram?