On Ethereum, I'm able to run and test a Fibonacci function by writing a Solidity smart-contract with a fib
method, compiling to the EVM, deploying and running offline by using any EVM implementation, such as Sputnick:
function fib(uint n) public constant returns(uint result) {
if (n <= 1) {
return 1;
} else {
return Fib.fib(n - 1) + Fib.fib(n - 2);
}
}
On Cardano, I'm aware I can use Haskell to create contracts, which is then compiled to Plutus. But, despite having spent some time googling, I'm still not sure how to achieve that. How do I run and test a "fib" function offline on Cardano?