[Felix-language] Composition

2014-12-06 Thread john skaller
Felix has a forward composition operator: (f \circ g) x = f (g x) There's no reverse composition operator, because I can't think of a suitable symbol. Operator dot (.) was used before and leads to a nice notation: x . (f . g) = (x . f) . g but it doesn't work because f. g means

[Felix-language] Composition operator

2010-10-23 Thread john skaller
I have now (hopefully) implemented functional composition using operator dot: //- fun f(x:int)=>x + x; fun g(x:int)=> x * x; // simple case, rhs is a name val k = f . g; //println$ 1 . k; println$ 1 . f . g; var z = (f . g) 1; println$ 1 . (f . g); println$ 1 . (g . f); // here