I am doing a program that have very similar code blocks, and I was trying to make a where in a “block”.
Just an example
function "sum" x = x + a
function "product" x = x * a
where
a = 2
I want the ‘a’ to be replaced in both lines, but I didn’t find out if this is possible using where
Thanks in advance
If you really need this, you need to merge the two function clauses. One way to do this: