Developing Games in Elm
gelatindesign.co.uk
gelatindesign.co.uk
1) build a functional language with lots of features but having a really weird ML-style syntax (because 'succinct' and "you don't need those braces")
2) create a try[lang name].com website
3) ?
4) Profit!
It was done in Haskell and available on Steam.
John Carmack also did a port of Wolf3D to Haskell, during his FP experiments.
It's not explained, but one of the reasons why is that function composition refactors more easily than chained code. The first operand (i.e. the value) in the chained code alters the semantics of all the subsequent chained code. You cannot replace parts of the chain as easy as you can with vanilla function composition; you always have that first value to worry about, and this reduces reusability slightly (compared to composition)
squareIsOdd = square >> isEven >> not -- `not` is a built-in function that inverts booleans
squareIsOdd 3 == True squareIsOdd 7 == False <-- huh?