Class Proc
In: lib/prelude.rb
Parent: Object

Methods

<<   curry  

Public Instance methods

This is will serve as an infix composition operator

[Source]

    # File lib/prelude.rb, line 55
55:   def <<(*args)
56:     if (1==args.length) && args[0].is_a?(Proc)
57:       proc {|*a| self.call(args[0].call(*a)) }
58:     else
59:       self.call(*args.flatten)
60:     end
61:   end

[Source]

    # File lib/prelude.rb, line 50
50:   def curry(one, *args)
51:     proc{ |*args| self.call(one, *args)}
52:   end