質問

If I want to apply f first and g second, I have to write:

g . f

Is there another standard syntax that would allow me to write the functions in the reverse order?

f <whatever> g

I know I can just invent my own syntax:

compose f g x = g (f x)

and then use it like this:

f `compose` g

But I would rather use a standard library facility.

役に立ちましたか?

解決

f >>> g from Control.Arrow.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top