a complex language with high level programming and moderate syntax.
- Clone this repository:
$ git clone https://github.com/kokonut27/zsq.git
- Add an alias
If you use macOS Catalina or newer, you will use Z-Shell so you will have a .zshrc
file in your home folder. Most distributions of Linux use Bash by default, so you will have a .bashrc
file in your home folder.
Of course, it is possible to change your shell so you should check before running the command.
Run the following command. If you use Bash replace .zshrc
with .bashrc
:
echo "alias zsq='python -B zsq'" >> .zshrc
You may want to install Windows Subsystem for Linux
echo "alias zsq='python -B zsq'" >> .bashrc
$ alias zsq="python -B zsq"
- Run z^2
Create a file named index.zsq
, which will contain all of your code. Then enter the following in the shell:
$ zsq index.zsq
Then you're all done!
// Defines the Fibonacci function
function Fibonacci(num) { // Creates an arg 'num'
whatif num <= 1 {
return(num)
}
else {
return(Fibonacci(num-1) + Fibonacci(num-2))
}
var ask = prompt("amount of fibonacci sequence? ")
for fib_seq in span(ask) {
print(Fibonacci(fib_seq))
}
This is a current work in progress as of right now. Visit EXAMPLES.md for more examples.
Feel free to contribute by forking the repo, and leaving a pull request!