Stream: Coq devs & plugin devs

Topic: Function composition notation


view this post on Zulip Matthieu Sozeau (Apr 19 2021 at 14:41):

Is it true that in 2021 OCaml still has no agreed-upon function composition notation (e.g. Haskell's. or the categorical \circ)?

view this post on Zulip Emilio Jesús Gallego Arias (Apr 19 2021 at 14:50):

I understand so @Matthieu Sozeau

view this post on Zulip Matthieu Sozeau (Apr 19 2021 at 14:51):

Ok. It seems ($) would be fine, but we don't have a standard in the codebase either, right?

view this post on Zulip Gaëtan Gilbert (Apr 19 2021 at 14:59):

fun x -> g (f x) works

view this post on Zulip Matthieu Sozeau (Apr 19 2021 at 16:04):

Sure it does, but I like my composition notation :)

view this post on Zulip Li-yao (Apr 19 2021 at 16:21):

$ for function composition sounds problematic for the Haskell crowd.

view this post on Zulip Matthieu Sozeau (Apr 19 2021 at 16:26):

Right. But we use @@ already for Haskell's $ and we cannot use (.) apparently

view this post on Zulip Matthieu Sozeau (Apr 19 2021 at 16:29):

^. would work as "composition of exponentials"


Last updated: Oct 16 2021 at 02:03 UTC