You can try getting rid of the <|
and using the composition function in prefix notation instead.
It'll first create a function that takes an argument, and have that function compose foo 1
.
That way, calling bar' 2
will return the composed function that takes the last argument.
I.e. (http://share-elm.com/sprout/52720bc5e4b03cf6e675bcc8):
foo : Int -> Int -> Int -> Maybe Bool
foo a b c = if a == 1 then Just True else Nothing
bar : Int -> Int -> Bool
bar b c = maybe False id <| foo 1 b c
bar' : Int -> Int -> Bool
bar' = (.) (maybe False id) . foo 1
-- the explicit evaluation precedence being: ((.) (maybe False id)) . (foo 1)
main = flow down [
asText <| bar 2 3
, asText <| bar' 2 3]