Skip to content

Comment on Factor 0.96 now available – over 1,100 commitsparent

Comments

But you can read left to right to get the order in which operations/transformations are performed:

    "hello world" uppercase print
While in languages where function application is prefix, you have to go inside to outside, right to left:
    print(uppercase("hello world"))
Additionally, if there are infix operators, the direction is switched mid statement:
    print(uppercase("hello" + "world"))
hello -> world <- uppercase <- print

I like the way Haskell uses it's composition function operator (.), it's very clean, e.g.

  λ>putStrLn . reverse .  map toUpper $ "hello world"
  DLROW OLLEH
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.