Smarandache prime-digital sequence: Difference between revisions

Content added Content deleted
(Add Factor example)
m (→‎Naive: Add MAIN: to make vocab runnable)
Line 74: Line 74:
: smarandache-demo ( -- )
: smarandache-demo ( -- )
"First 25:" print 25 smarandache ltake list>array .
"First 25:" print 25 smarandache ltake list>array .
"100th: " write smarandache 99 [ cdr ] times car . ;</lang>
"100th: " write smarandache 99 [ cdr ] times car . ;

MAIN: smarandache-demo</lang>
{{out}}
{{out}}
<pre>
<pre>
Line 107: Line 109:
100th: 33223
100th: 33223
</pre>
</pre>

===Optimized===
===Optimized===
<lang factor>USING: combinators generalizations io kernel math math.functions
<lang factor>USING: combinators generalizations io kernel math math.functions