A,(B,C) == A,B,C == (A,B),C
while an (arboreal) expression is not: A,[B,C] <> [A,B],C
one syntax I've played around with is due to physics envy: ⟨expression∣intermediate bindings∣pattern⟩
eg fib := ⟨n*fib(n-1)∣n>1⟩ + ⟨1|n<=1⟩
gcd := ⟨gcd(x,y-x)∣x,y>x⟩ + ⟨gcd(x-y,y)∣x,y<x⟩ + ⟨x∣x,y==x⟩
ftoc := ⟨c∣ c:=t*5/9; t:=f-32 ∣f⟩ NB. °F to C
note that (for codegen purposes) we can simplify expressions and (with failure provision) patterns by expanding them into the intermediate section, similar to ANF; if we were going all the way down to assembly we might want to lower through ftoc' := ⟨c∣ c:=t*m; t:=f-a; m:=0.56; a:=32.0 ∣f⟩
but on the other had could have raised to ftoc'' := ⟨(f-32)*5/9 ∣ f⟩
and, on the gripping hand, if we wished to be austere, maybe it could be worth it to even insist that in the expression place, computations be injections, in the intermediate isos (changes of representation), and in the pattern surjections?(note also that here for simplicity I've deliberately used non-overlapping patterns; there's a nice pattern-calculus that allows for both simpler programs and simpler interpreters if one allows algebraic combination with overlapping patterns. However, I've probably made my language unadoptable because no matter what the syntax, combination of patterns is always deliberately unordered — ordering can be achieved if the user insists, but as a 2nd class construct)
finally, everything is given here in the identity monad for simplicity, but the same ideas carry over unchanged to other monads.