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
@aescling just from having seen One thing lol
@manifold lol
@manifold haskell was a language defined by consensus by computer scientists who wanted to package several ideas that were in vogue at the time into a single language
@manifold tbh haskell has made a lot of sacrifices in the service of pragmatism (yes, really); if you really wanna see programming that looks like math, try looking up algol sometime lmao
@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)
@alyssa wait what
@alyssa since when
@aescling dunno. looks like it might be used in the parser? https://hoogle.haskell.org/?hoogle=(a%20%2D%3E%20b)%20%2D%3E%20(b%20%2D%3E%20c)%20%2D%3E%20a%20%2D%3E%20c&scope=set%3Astackage
annoyingly hoogle’s links do not actually work for the docs for internal GHC code
@aescling my initial reaction to this is that it makes it look like haskell was made by someone who went "let's make programming look more like math" instead of "let's make math look more like programming"