#Defining function in the order wanted for clarity, at least in one file

3 messages · Page 1 of 1 (latest)

torpid void
#

Currently this shows no error :

#let svg(_str) = {...}

#let test(x) = svg(r)

but this does :

#let test(x) = svg(r)

#let svg(_str) = {...}

It would be really convenient to be able to define things in any order for readability purposes

whole gale
#

I believe it's not not possible to implement, but very difficult. And I don't really see the payoff. What if the variable is shadowed later:

#let x() = 1;
#let do_x() = x;
#let x() = 2;
#do_x() // prints 1, as it should
torpid void
#

I kinda forgot this was interpreted to be honest ~~