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) · 800 Bytes
/
test.fut
File metadata and controls
59 lines (47 loc) · 800 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 "scrabble_score"
-- lowercase letter
-- ==
-- input { "a" }
-- output { 1 }
-- uppercase letter
-- ==
-- input { "A" }
-- output { 1 }
-- valuable letter
-- ==
-- input { "f" }
-- output { 4 }
-- short word
-- ==
-- input { "at" }
-- output { 2 }
-- short, valuable word
-- ==
-- input { "zoo" }
-- output { 12 }
-- medium word
-- ==
-- input { "street" }
-- output { 6 }
-- medium, valuable word
-- ==
-- input { "quirky" }
-- output { 22 }
-- long, mixed-case word
-- ==
-- input { "OxyphenButazone" }
-- output { 41 }
-- english-like word
-- ==
-- input { "pinata" }
-- output { 8 }
-- empty input
-- ==
-- input { "" }
-- output { 0 }
-- entire alphabet available
-- ==
-- input { "abcdefghijklmnopqrstuvwxyz" }
-- output { 87 }
let main (letters: []u8): i32 =
score letters