A function composition. This simply composes its two argument functions when applied to a final argument via `of`.
| 170 | |
| 171 | |
| 172 | class Composition(Composable): |
| 173 | """A function composition. |
| 174 | |
| 175 | This simply composes its two argument functions when |
| 176 | applied to a final argument via `of`. |
| 177 | """ |
| 178 | |
| 179 | def __init__(self, f, g): |
| 180 | self.f = f |
| 181 | self.g = g |
| 182 | |
| 183 | def funcall(self, x): |
| 184 | return self.g.funcall(self.f.funcall(x)) |
| 185 | |
| 186 | |
| 187 | # These are DSL names, not Python names |