Skip to content

Commit

Permalink
Format manually
Browse files Browse the repository at this point in the history
  • Loading branch information
SleeplessByte committed Aug 1, 2024
1 parent 8890e58 commit 46b9678
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions exercises/practice/list-ops/.meta/proof.ci.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ class Cons<T> {
}

public concat(others: Cons<Cons<T>>): Cons<T> {
return others.foldl<Cons<T>>(
(result, other) => result.append(other),
this
)
return others.foldl<Cons<T>>((result, other) => result.append(other), this)
}

public foldl<TReturn = unknown>(
Expand All @@ -89,10 +86,7 @@ class Cons<T> {
callback: (initial: TReturn | undefined, value: T) => TReturn,
initial?: TReturn
): TReturn {
return this.next.foldl<TReturn>(
callback,
callback(initial, this.value)
)
return this.next.foldl<TReturn>(callback, callback(initial, this.value))
}

public forEach(callback: (value: T) => void): void {
Expand All @@ -111,7 +105,10 @@ class Cons<T> {
initial?: TReturn
): TReturn {
return callback(
this.next.foldr<TReturn>(callback as (initial: TReturn, value: T | undefined) => TReturn, initial as TReturn),
this.next.foldr<TReturn>(
callback as (initial: TReturn, value: T | undefined) => TReturn,
initial as TReturn
),
this.value
)
}
Expand Down

0 comments on commit 46b9678

Please sign in to comment.