-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
50 lines (31 loc) · 914 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Q - a simple programming language
/ Q Q Q Q
Q Q
Q Q Q Q Q
Q
Q
Install the gem from RubyGems:
$ gem install ql
Then you can use the small `q' runner to run your .q files:
$ q examples/factorial.q
Example syntax:
# assignment
a <: 10;
b <: 11;
# operations
a <: 3 + 5;
a <: a = b;
a <: a < b;
a <: b > a;
# functions
# @ refers to the current function
# every function returns @ by default
# unless you assign @ another value
factorial <: (n){
if [n < 2] then [@ <: 1] else [@ <: n * @(n - 1)];
};
tenth_factorial <: factorial(10);
This language is an experiment and parts of it were presented at
MKRUG (http://ruby.mk).
This software is licensed under the MIT/X11 license and is
Copyright (C) 2014 Stojan Dimitrovski. See LICENSE for more details.