-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest1.tah
43 lines (34 loc) · 977 Bytes
/
test1.tah
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
scoop "larder/math" into math;
scoop "larder/collections" into collections;
scoop "larder/string" into string;
scoop "larder/io";
scoop "larder/time" into time;
scoop "larder/random" into random;
scoop "larder/http" into http;
print random::random();
print random::randomInt(3,10);
print http::get("https://jsonplaceholder.typicode.com/posts/1");
var curr = time::now();
print curr;
print time::format(curr, "YYYY-MM-DD HH:mm");
print time::toIso(curr);
print string::replace("hello world cello", "llo", 44);
print math::sin(0.5);
print math::log(10);
print math::floor(3.14);
var dict = {
"a": 1,
"b": 2,
"c": 3,
"d": 4,
"e": 5
};
print dict["a"];
print collections::keys(dict);
print collections::values(dict);
print collections::append(collections::keys(dict), collections::values(dict));
print collections::remove(collections::keys(dict), 2);
var l = string::split("hello. world", ". ");
print len(l);
print l[1];
print string::join(l, " | ");