Skip to content

Commit

Permalink
fix indentation of extract
Browse files Browse the repository at this point in the history
  • Loading branch information
keiravillekode committed Jan 19, 2024
1 parent 25913c1 commit 9a9130d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions exercises/practice/matrix/.meta/example.sml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ local
val cells: string -> string list =
String.tokens (fn (c: char) => c = #" ")

fun extract (index: int) (l: string list): string =
List.nth (l, index - 1)
fun extract (index: int) (l: string list): string =
List.nth (l, index - 1)
in
fun row (s: string, index: int): int list =
map (valOf o Int.fromString) ((cells o extract index o lines) s)

fun column (s: string, index: int): int list =
map (valOf o Int.fromString o extract index o cells) (lines s)
end

1 change: 1 addition & 0 deletions exercises/practice/matrix/matrix.sml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ fun row (s: string, index: int): int list =

fun column (s: string, index: int): int list =
raise Fail "'column' is not implemented"

0 comments on commit 9a9130d

Please sign in to comment.