Skip to content

Commit dcc71d1

Browse files
authored
28 (#290)
1 parent 41b2490 commit dcc71d1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

HumanEvalLean/HumanEval28.lean

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
module
22

3-
def concatenate : Unit :=
4-
()
3+
def concatenate (strings : List String) : String :=
4+
String.join strings
5+
6+
theorem toList_concatenate {strings : List String} :
7+
(concatenate strings).toList = strings.flatMap String.toList := by
8+
simp [concatenate]
59

610
/-!
711
## Prompt
@@ -41,4 +45,4 @@ def check(candidate):
4145
assert candidate(['x', 'y', 'z']) == 'xyz'
4246
assert candidate(['x', 'y', 'z', 'w', 'k']) == 'xyzwk'
4347
```
44-
-/
48+
-/

0 commit comments

Comments
 (0)