Closed abrudz closed 3 years ago
Yeah this should be a thing. Might even be possible to have it span multiple lines. The desktop program techncially already lets you write multi-line expressions if you press enter before closing a bracket. Could end up being quite readable!
Looks like this right now. Eventually I also want to format it like this automatically (well, on the web version only probably), and make semicolons optional when it is spanned over several lines.
Cool. So does this work?
f(x)={
1 if x≤1
f(x-1)+f(x-2) if x>1
}
Cool. So does this work?
f(x)={ 1 if x≤1 f(x-1)+f(x-2) if x>1 }
Not yet, but that's actually the next thing I'm planning to implement, if things go as planned! (just added otherwise
as well)
@abrudz Seems to be working fairly well now from what I can tell. Your example worked, and I was able to make a function to get fibonacci numbers! You have been very helpful, thank you.
Because of the nature of this kind of change, I'll make sure it gets tested a bit more before I push it.
cf869358f29fa55adc217415796d3768e4964069
68e07699422d877d523860fcb03d806ed55006e0
For example
could be written as
or: