You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return n < 2 ? n : (fibonacci(n - 1) + fibonacci(n - 2));
}
void main() {
var i = 20; // input
print('fibonacci($i) = ${fibonacci(i)}');
}
///// Lambda Function ///////////
//They are the short way of representing a function in Dart. They are also called arrow function. But you should note that with lambda function you can return value for only one expression.