my favorite nonidiomatic haskell thing i’d do was to define g (&.) f = \x -> f (g x) (you need to do some fucking around with the operator to make this work right but i forget the details) so you could write long function compositions in execution order like a shell pipeline

Follow

@aescling yeah, defining it as flip (.) seems more idiomatic :3c

@alyssa oh i just meant that (&.) (or whatever you would call it) is very much not idiomatic

though yeah that is a preferable definition to me

@aescling GHC does it! (i only know that because of a hoogle search i have not read any part of the GHC source code)

@aescling dunno. looks like it might be used in the parser? hoogle.haskell.org/?hoogle=(a%

annoyingly hoogle’s links do not actually work for the docs for internal GHC code

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.