⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
Method
/
View File Name :
curry-i.ri
U:RDoc::AnyMethod[iI" curry:ETI"Method#curry;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [ I"ZReturns a curried proc based on the method. When the proc is called with a number of ;TI"]arguments that is lower than the method's arity, then another curried proc is returned. ;TI"]Only when enough arguments have been supplied to satisfy the method signature, will the ;TI"method actually be called.;To:RDoc::Markup::BlankLine o; ; [I"VThe optional <i>arity</i> argument should be supplied when currying methods with ;TI"Xvariable arguments to determine how many arguments are needed before the method is ;TI"called.;T@o:RDoc::Markup::Verbatim; [I"def foo(a,b,c) ;TI" [a, b, c] ;TI" end ;TI" ;TI"%proc = self.method(:foo).curry ;TI"2proc2 = proc.call(1, 2) #=> #<Proc> ;TI"2proc2.call(3) #=> [1,2,3] ;TI" ;TI"def vararg(*args) ;TI" args ;TI" end ;TI" ;TI"*proc = self.method(:vararg).curry(4) ;TI",proc2 = proc.call(:x) #=> #<Proc> ;TI",proc3 = proc2.call(:y, :z) #=> #<Proc> ;TI"4proc3.call(:a) #=> [:x, :y, :z, :a];T:@format0: @fileI"proc.c;T:0@omit_headings_from_table_of_contents_below0I"9meth.curry -> proc meth.curry(arity) -> proc ;T0[ I"(*args);T@)FI"Method;TcRDoc::NormalClass00