14 lines
196 B
Text
14 lines
196 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))
|
|
}
|