/fibora

📘 Utilities for the Fibonacci Number and Sequence

Primary LanguageRustMIT LicenseMIT

Fibora

GitMoji License: MIT Lines Of Code

Port of fibonacci-deno for Rust.

Utilities for the Fibonacci Number and Sequence.

Usage

This package exposes two Functions, fibonacci and fibonacci_sequence.

use fibora::{fibonacci, fibonacci_sequence};

fn main() {
    println!("{}", fibonacci(23));
    println!("{:?}", fibonacci_sequence(23));
}

CLI Tool

This project contains a cli tool, it is made to give an example of use mainly.

Install it

cargo install fibora --features=binaries

Usage

  • Get the Nth Fibonacci Number:
$ fibora --number 3
2
  • Get an Array with the first N numbers of the Fibonacci Sequence:
$ fibora --sequence 3
[ 0, 1, 1 ]

Or use a binary from releases.

Related

License

This project is licensed under the MIT License.