andrewcoppin at btinternet.com
Sat Aug 25 14:36:02 EDT 2007
Bertram Felgenhauer wrote:
> You wrote:
>> - An interactive function plotter. (GNUplot is nice, but it can't plot
>> recursive functions...)
> Actually you can express a lot of those with the ?: operator.
Ooo... interesting. I don't recall seeing *that* in the manual!
> gnuplot> f(x) = x < 1 ? 0 : f(x/2) + 1
> gnuplot> plot f(x)
> works just as expected. Mutually recursive functions defined that
> way work, too.
> Still, support could be a lot better here.
OK... so how do I plot a graph of the Fibonacci numbers?
Similarly, how do I plot (what Haskell calls) interate f 0?
More information about the Haskell-Cafe