Sha256: 7abab7e3fbcbe55ddd80779de6d4b2489de1cf4b33df144cedaaf06191e50cd5

Contents?: true

Size: 310 Bytes

Versions: 1

Compression:

Stored size: 310 Bytes

Contents

module Kl
  # Trampolines hold a function and a list of its already-evaluated
  # arguments. They are used to keep the strack from growing on
  # tail calls.
  class Trampoline
    attr_reader :fn, :args, :f
    
    def initialize(fn, args, f)
      @fn = fn
      @args = args
      @f = f
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shen-ruby-0.1.0 lib/kl/trampoline.rb