diff --git a/Src/Problem2.lean b/Src/Problem2.lean index 4342a1d..0a578b8 100644 --- a/Src/Problem2.lean +++ b/Src/Problem2.lean @@ -12,7 +12,9 @@ def myButLast (l : List α) : Option α := none else let i := l.length - 2; - id <$> l[i]? + match l[i]? with + | some x => some x + | none => none -- sorry -- The following codes are for test and you should not edit these.