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
74 lines (59 loc) · 1.4 KB
/
test.fut
File metadata and controls
74 lines (59 loc) · 1.4 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import "isogram"
-- empty string
-- ==
-- input { "" }
-- output { true }
-- isogram with only lower case characters
-- ==
-- input { "isogram" }
-- output { true }
-- word with one duplicated character
-- ==
-- input { "eleven" }
-- output { false }
-- word with one duplicated character from the end of the alphabet
-- ==
-- input { "zzyzx" }
-- output { false }
-- longest reported english isogram
-- ==
-- input { "subdermatoglyphic" }
-- output { true }
-- word with duplicated character in mixed case
-- ==
-- input { "Alphabet" }
-- output { false }
-- word with duplicated character in mixed case, lowercase first
-- ==
-- input { "alphAbet" }
-- output { false }
-- hypothetical isogrammic word with hyphen
-- ==
-- input { "thumbscrew-japingly" }
-- output { true }
-- hypothetical word with duplicated character following hyphen
-- ==
-- input { "thumbscrew-jappingly" }
-- output { false }
-- isogram with duplicated hyphen
-- ==
-- input { "six-year-old" }
-- output { true }
-- made-up name that is an isogram
-- ==
-- input { "Emily Jung Schwartzkopf" }
-- output { true }
-- duplicated character in the middle
-- ==
-- input { "accentor" }
-- output { false }
-- same first and last characters
-- ==
-- input { "angola" }
-- output { false }
-- word with duplicated character and with two hyphens
-- ==
-- input { "up-to-date" }
-- output { false }
let main (phrase: []u8): bool =
is_isogram phrase