fork download
  1. ! Copyright (C) 2006 Daniel Ehrenberg
  2. ! See http://f...content-available-to-author-only...e.org/license.txt for BSD license.
  3. USING: kernel math sequences strings io ;
  4. IN: factorial ;
  5.  
  6. : fac ( n -- n ) dup 1 <= [ drop 1 ] [ dup 1 - fac * ] if ;
  7.  
  8. 5 fac print
  9.  
Runtime error #stdin #stdout 0.18s 159232KB
stdin
Standard input is empty
stdout
./prog.factor

4: IN: factorial ;
                  ^
Expected end of input but got ;