...
This commit is contained in:
parent
98e332f9a1
commit
43035cf142
2 changed files with 8 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
import gleam/int
|
import gleam/int
|
||||||
import gleam/io
|
import gleam/io
|
||||||
import gleam/iterator
|
import gleam/iterator
|
||||||
import gleam/list.{count, filter_map, map}
|
import gleam/list.{count, filter, filter_map, reverse}
|
||||||
import gleam/string
|
import gleam/string
|
||||||
import stdin.{stdin}
|
import stdin.{stdin}
|
||||||
|
|
||||||
|
@ -46,6 +46,6 @@ fn parse(it: iterator.Iterator(String)) -> List(List(Int)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|> list.filter(fn(l) { list.length(l) > 0 })
|
|> filter(fn(l) { list.length(l) > 0 })
|
||||||
|> list.reverse
|
|> reverse
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
import gleam/int
|
import gleam/int
|
||||||
import gleam/io
|
import gleam/io
|
||||||
import gleam/iterator
|
import gleam/iterator
|
||||||
import gleam/list.{any, count, filter_map, flatten, length, range, split}
|
import gleam/list.{
|
||||||
|
any, count, filter, filter_map, flatten, length, range, reverse, split,
|
||||||
|
}
|
||||||
import gleam/string
|
import gleam/string
|
||||||
import stdin.{stdin}
|
import stdin.{stdin}
|
||||||
|
|
||||||
|
@ -54,6 +56,6 @@ fn parse(it: iterator.Iterator(String)) -> List(List(Int)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|> list.filter(fn(l) { list.length(l) > 0 })
|
|> filter(fn(l) { list.length(l) > 0 })
|
||||||
|> list.reverse
|
|> reverse
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue