logoalt Hacker News

Luarrow – True pipeline operators and elegant Haskell-style function compositio

20 pointsby todsacerdoti12/03/20254 commentsview on HN

Comments

orthoxeroxlast Tuesday at 7:14 AM

I love it when people push syntax to its limits. The only thing I do not like is how `^` points in the wrong direction when you stack it vertically, like in the example:

    local _ = 5
      % arrow(function(x) return -x end)
      ^ arrow(function(x) return x + 10 end)
      ^ arrow(function(x) return x * x end)
      ^ arrow(print)  -- 25
show 1 reply
wosinedlast Tuesday at 12:01 PM

Just use Haskell. You can be among the first.

NuclearPMlast Tuesday at 1:29 PM

Lua really needs shorter function syntax for this type of thing to work.

My hobby compile to Lua language uses [ x | x + 1 ] and [ ] for a no-arg function/block.