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
54 lines (43 loc) · 1.12 KB
/
test.fut
File metadata and controls
54 lines (43 loc) · 1.12 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
import "pangram"
-- empty sentence
-- ==
-- input { "" }
-- output { false }
-- perfect lower case
-- ==
-- input { "abcdefghijklmnopqrstuvwxyz" }
-- output { true }
-- only lower case
-- ==
-- input { "the quick brown fox jumps over the lazy dog" }
-- output { true }
-- missing the letter 'x'
-- ==
-- input { "a quick movement of the enemy will jeopardize five gunboats" }
-- output { false }
-- missing the letter 'h'
-- ==
-- input { "five boxing wizards jump quickly at it" }
-- output { false }
-- with underscores
-- ==
-- input { "the_quick_brown_fox_jumps_over_the_lazy_dog" }
-- output { true }
-- with numbers
-- ==
-- input { "the 1 quick brown fox jumps over the 2 lazy dogs" }
-- output { true }
-- missing letters replaced by numbers
-- ==
-- input { "7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog" }
-- output { false }
-- mixed case and punctuation
-- ==
-- input { "\"Five quacking Zephyrs jolt my wax bed.\"" }
-- output { true }
-- a-m and A-M are 26 different characters but not a pangram
-- ==
-- input { "abcdefghijklm ABCDEFGHIJKLM" }
-- output { false }
let main (sentence: []u8): bool =
is_pangram sentence