where-clausefflanura

should FFL where clause allow referring to previous variable?


So, in Frogatto Formula Language we can have a where clause with multiple assignments, like where a = yadda, b = foo

However I can't refer to a in the assignment of b ?

I was hoping to simplify by breaking it into steps, where a = ..., b = ...(refers to var a)...

Note: it doesn't seem to work in where b,a order either:

EVALUATING: [a,b] where b=a+1, a=1
ASSERTION FAILED: Unknown symbol 'a'
[a,b] where b=a+1, a=1
              ^^

Solution

  • Use a ladder of where clauses, like this:

    [a,b] where b = a+1 where a = 1