Modulinos: Difference between revisions

→‎{{header|Factor}}: Show how to ./factor run=fibonacci
(Use 'lifemain')
(→‎{{header|Factor}}: Show how to ./factor run=fibonacci)
Line 308:
MAIN: first-15</lang>
 
One can run the main program infrom the listener:
 
<pre>( scratchpad ) "fibonacci" run
Loading resource:work/fibonacci/fibonacci.factor
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377</pre>
 
One can also run the main program as a script:
 
<pre>$ ./factor run=fibonacci
Loading resource:work/fibonacci/fibonacci.factor
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377</pre>
Line 319 ⟶ 325:
( scratchpad ) 20 fib .
6765</pre>
 
However, nothing happens if you run it as a script (<tt>./factor work/fibonacci/fibonacci.factor</tt>), because there is no code to call the main entry point.
 
=={{header|Haskell}}==
Anonymous user