|
|
|
|
|
by montanonic
3440 days ago
|
|
And yet the following is profoundly more intelligible to a wide range of functional programmers: -- Using Elm syntax pipeline : List (Int -> Int) pipeline = [(\x -> x + 3), (\x -> x * 2), abs] applyPipeline : Int -> Int applyPipeline value = List.foldr (\func val -> func val) value pipeline -- or more succinctly applyPipeline_ value = List.foldr (<|) value pipeline Getting lost in the mathematical abstractions is really no help here. In niche circumstances I'm sure it's great, but like.... not here. |
|