Sha256: 0f48f0b195cffadeddcf2e6e308f4201501586f1391da688c2912ba062353704

Contents?: true

Size: 164 Bytes

Versions: 7

Compression:

Stored size: 164 Bytes

Contents

# factorial.fy
# Example of factorial

class Fixnum {
  def factorial {
    1 upto: self . product
  }
}

1 upto: 10 do: |i| {
  "#{i}! = #{i factorial}" println
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fancy-0.10.0 examples/factorial.fy
fancy-0.9.0 examples/factorial.fy
fancy-0.8.0 examples/factorial.fy
fancy-0.7.0 examples/factorial.fy
fancy-0.6.0 examples/factorial.fy
fancy-0.5.0 examples/factorial.fy
fancy-0.4.0 examples/factorial.fy