Skip to content

Commit

Permalink
Eliminated long lines
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Jan 23, 2025
1 parent 30ca275 commit e5ce24f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/turbulence-core.scala
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ package stdioSources:
extension [ElementType](stream: LazyList[ElementType])
def deduplicate: LazyList[ElementType] =
def recur(last: ElementType, stream: LazyList[ElementType]): LazyList[ElementType] =
stream.flow(LazyList())(if last == head then recur(last, tail) else head #:: recur(head, tail))
stream.flow(LazyList()):
if last == head then recur(last, tail) else head #:: recur(head, tail)

stream.flow(LazyList())(head #:: recur(head, tail))

Expand Down

0 comments on commit e5ce24f

Please sign in to comment.