Nature
is a programming language and compiler, may you be able to experience the joy of programming.
GET STARTEDDOWNLOADfib.n
import fmt
fn fib(int n):int {
if n <= 1 {
return n
}
return fib(n - 1) + fib(n - 2)
}
fmt.printf('fib result is %d', fib(30))
Functions Defined
A fib evaluation function was defined using recursion.
Call the fib function and pass its result to fmt.printf for output.
Install nature and execute the compile command
> nature build fib.n && ./main
fib result is 832040
What's possible
đŽ
Game engine and game production
đ¤
Science and AI computing
đ°
Operating Systems and Internet of Things
đ
WEB development
Features
âī¸ Reliable
The type system assists you in writing efficient and reliable applications, while cross-platform static compilation can help you quickly build and deploy your applications.
đ Concise
A concise syntax and smooth learning curve minimize your learning cost and allow you to write concise and elegant code.
đŗ Open
Nature is a programming language that belongs to its users. Everyone has the ability to contribute their own ideas or directly participate in its development.