REBOL [
    Title:   "Fibonacci"
    Author:  "Aldo Calpini"
    Date:    03-Jul-2001
    File:    %fibo.r
]

Fib: func [N] [
    return either N < 2  [ 1 ] [ (Fib N - 2) + (Fib N - 1) ]
]

NUM: to-integer to-string system/script/args
NUM: either NUM < 1 [ 1 ] [ NUM ]
R: Fib NUM
write %output.rebol rejoin [ R ]