14 lines
197 B
Text
14 lines
197 B
Text
import extensions;
|
|
|
|
extension op : Func1
|
|
{
|
|
compose(Func1 f)
|
|
= (x => self(f(x)));
|
|
}
|
|
|
|
public Program()
|
|
{
|
|
var fg := (x => x + 1).compose::(x => x * x);
|
|
|
|
Console.printLine(fg(3))
|
|
}
|