forked from exercism/futhark
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.fut
More file actions
59 lines (47 loc) · 962 Bytes
/
test.fut
File metadata and controls
59 lines (47 loc) · 962 Bytes
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
51
52
53
54
55
56
57
58
59
import "secret_handshake"
-- wink for 1
-- ==
-- input { 1 }
-- output { "wink" }
-- double blink for 10
-- ==
-- input { 2 }
-- output { "double blink" }
-- close your eyes for 100
-- ==
-- input { 4 }
-- output { "close your eyes" }
-- jump for 1000
-- ==
-- input { 8 }
-- output { "jump" }
-- combine two actions
-- ==
-- input { 3 }
-- output { "wink, double blink" }
-- reverse two actions
-- ==
-- input { 19 }
-- output { "double blink, wink" }
-- reversing one action gives the same action
-- ==
-- input { 24 }
-- output { "jump" }
-- reversing no actions still gives no actions
-- ==
-- input { 16 }
-- output { "" }
-- all possible actions
-- ==
-- input { 15 }
-- output { "wink, double blink, close your eyes, jump" }
-- reverse all possible actions
-- ==
-- input { 31 }
-- output { "jump, close your eyes, double blink, wink" }
-- do nothing for zero
-- ==
-- input { 0 }
-- output { "" }
let main (code: i32): []u8 =
commands code