Sha256: c437e31f1b61ffe753880bf2ba7c4d5ac72e6b2539071c97f44748eff264bc8e

Contents?: true

Size: 174 Bytes

Versions: 6

Compression:

Stored size: 174 Bytes

Contents

require "nyara"

configure do
  port 3000
end

def fib i
  a, b = 0, 1
  i.times { a, b = b, a + b }
  a
end

get '/fib/%d' do |i|
  send_string "fib(#{i}) = #{fib i}\n"
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nyara-0.0.1.pre.5 example/fib.rb
nyara-0.0.1.pre.4 example/fib.rb
nyara-0.0.1.pre.3 example/fib.rb
nyara-0.0.1.pre.2 example/fib.rb
nyara-0.0.1.pre.1 example/fib.rb
nyara-0.0.1.pre example/fib.rb