A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Welcome to the Arkscript page! Here, you'll find a description of the language as well as a list of sample programs in that language.
This article was written by:
ArkScript is
[...]
is expanded to (list ...)
and {...}
to (begin ...)
Also, it has:
Example:
(let fibo (fun (n)
(if (< n 2)
n
(+ (fibo (- n 1)) (fibo (- n 2))))))
(print (fibo 28)) # display 317811
On the first line:
fibo
, using the let
keywordfun
, taking a single argument, n
On the second line, we check if n is less than 2 (all functions and keywords are always after an opened paren (
).
If the condition is true, on line 3 we return the value of n
.
Otherwise, on line 4, we return the addition of (fibo (- n 1))
and (fibo (- n 2))
.
Then on line 6 we call print
with the function call (fibo 28)
as its argument.
There is 1 article: